Mega Code Archive

 
Categories / Python Tutorial / Statement
 

Use a loop to ensure that the user enters a name

name = ''  while not name:      name = raw_input('Please enter your name: ') print 'Hello, %s!' % name