Jan-05-2020, 10:40 AM
1 2 3 4 5 |
key = input ( "enter key" ) try : key = ord (key) except ValueError: print ( "wrong key pressed" ) |
Error:enter key
Traceback (most recent call last):
File "/home/vivek/Documents/prac.py", line 3, in <module>
key = ord(key)
TypeError: ord() expected a character, but string of length 0 found