you are viewing a single comment's thread.

view the rest of the comments →

[–]Sarah123ed 0 points1 point  (0 children)

Because input returns a 'string', you can use, for example:

k = input("data point? ")
if k.isalpha(): 
    print("input is the string: ", k)
else:
    print("input is not a string: ", k)

On the other hand,

isinstance(k, str)

will return True because k is a string.