This is a very simple function in Python
def not_string(str1):
if str1[0:3] is "not":
return str1
else:
return 'not ' + str1
str1 = 'not bad'
print(not_string(str1))
The output of the above code should be "not bad" but the Python is showing output as "not not bad. Can anyone explain what I am missing here?