jeudi 19 février 2015

how to validate a string with a basic code in python

I need to know how to check if a string only contains letters.


example:



name=input("enter your name \n")
while len(name) < 2:
name=input("please enter a valid name \n")


thank you all


Aucun commentaire:

Enregistrer un commentaire