Mega Code Archive

 
Categories / Python / String
 

For Statements to list the string length

a = ['cat', 'window', 'defenestrate'] for x in a:      print x, len(x)