if var == 'stringone' or var == 'stringtwo':
dosomething()
'is' is used to check if the two references are referred to a same object. It compare the memory address.
Apparently, 'stringone' and 'var' are different objects, they just contains the same string, but they are two different instances of the class 'str'. So they of course has two different memory addresses, and the 'is' will return False.