Is there a more efficient way of doing this? Any help is gratly appreciated.
import random def partdeux(): print('''A man lunges at you with a knife! Do you DUCK or PARRY?''') option1=('duck') option2=('parry') optionsindex=[option1, option2] randomizer=random.choice(optionsindex) while randomizer==option1: if input() in option1: print('he tumbles over you') break else: print('he stabs you') break while randomizer==option2: if input() in option2: print('you trip him up') break else: print('he stabs you') break partdeux() -- http://mail.python.org/mailman/listinfo/python-list