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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -