csc-python-solutions/07/a/4 - Next Letter.py

8 lines
164 B
Python
Raw Normal View History

2021-02-18 17:29:38 +00:00
char = input()
if ord(char) == ord("Z"):
print("A")
else:
print(chr(ord(char) + 1))
# without if:
# print(chr((ord(input()) - ord("A") + 1) % 26 + ord("A")))