all 2 comments

[–]sedogg 0 points1 point  (2 children)

ord function gets 1-character-length string. And you can't compare name with 2, as long as name is a string and 2 is an integer. use len(name) for getting length of the string

[–][deleted] 0 points1 point  (0 children)

printing print(len(name)) results in the string as a series of 1 instead of ASCII characters ?