Created
August 22, 2021 09:21
-
-
Save USLTD/cc669c52c161cf21ed5abe017200241d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from wcwidth import wcswidth | |
def reverse(string: str): | |
length: int = wcswidth(string) | |
l: list = [] | |
for c in string: | |
l.append(ord(c)) | |
l = l[::-1] | |
for o in l: | |
print(chr(o), end="") | |
print() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment