Disallow only spaces after a string - Python 3.3 -


if name = 'steve 'how disallow this? allow 'steve 2' , 'steve'

this because printing out keys dictionaries , don't want confusion between names displayed. thanks.

if name != name.rstrip():     # disallow 

Comments