Untitled

 avatar
unknown
python
2 years ago
219 B
4
Indexable
str = input("Input string: ")
offset = int(input("Input offset number: "))
result_symbols = [chr(ord(c) + offset) if (c >= 'a' and c <= 'z') or (c >= 'A' and c <= 'Z') else c for c in str]
print(''.join(result_symbols))
Editor is loading...