>>> deffoo(a):print"called the function"if(a==1):
return1else:
returnNone>>> a=1>>> if(foo(a) != Noneand foo(a) ==1):
print"asdf"
called the function
called the function
asdf
Hey. how can i avoid calling the function twice without using an extra variable.