pyton check if 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 == 'stringone' or var == 'stringtwo':
dosomething()
isinstance(s, str)
if var == 'stringone' or var == 'stringtwo':
dosomething()