string.isidentifier() method
Return True if the string is a valid identifier according to the Python language definition.
Clickable & Draggable!