check if given string is a correct variable name python code example
Example: python check if variable is string
# python 2
isinstance(s, basestring)
# python 3
isinstance(s, str)
# python 2
isinstance(s, basestring)
# python 3
isinstance(s, str)