How do I ask the user to input the string only. If there isn't such a thing how do I set it so that if they enter anything else it would ask the user to re-enter.
This is what I have tried (it doesn't work):
name = raw_input("Enter name: ")
if name != str(name):
name = raw_input("Error, please re-enter : ")
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…