you can try defining a function calc or what ever u want and write the whole
code in that function and u can directly call that function whenever u need
def calc():
your code
if answer == 'yes' or 'Yes':calc()
elif answer == 'no' or 'No':print "Thanks for using my calculator