Skip to content

Instantly share code, notes, and snippets.

@USLTD
Created August 22, 2021 09:21
Show Gist options
  • Save USLTD/cc669c52c161cf21ed5abe017200241d to your computer and use it in GitHub Desktop.
Save USLTD/cc669c52c161cf21ed5abe017200241d to your computer and use it in GitHub Desktop.
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