you can define a function for all the if statements. put all functions into a list and use random.choice for this list.
I don't know how will your if statements' bodies will be, so I'm not sure is there any other efficient way than defining all individual function.
I know I couldn't give the answer you need. but maybe you can tell more about what you need and how if statements are.
and sorry for my english if I've made a mistake.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…