python how to check if it is a string code example
Example 1: if type is string python
isinstance(s, str)
Example 2: how to check a string in if statement python
if var in ('stringone', 'stringtwo'):
dosomething()
isinstance(s, str)
if var in ('stringone', 'stringtwo'):
dosomething()