+ 1
Python Int And Str
odd=2 if odd==int: print('worked') elif odd==str: print('phew') else: print('fail') Results=fail How Can I Change The Results To worked
2 Respuestas
+ 1
i think, you need to use
if type(odd)==int:
elif type(odd)==str:
+ 1
Thanks Very HelpFull