Skip to content

Instantly share code, notes, and snippets.

@lettergram
Last active February 1, 2019 06:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lettergram/ea22c94f63bcc7b61cab95b32dff35ea to your computer and use it in GitHub Desktop.
Save lettergram/ea22c94f63bcc7b61cab95b32dff35ea to your computer and use it in GitHub Desktop.
# Python Implementation of Hello Worms
string = bytearray("Hello, Worms!", 'UTF-8')
for i in range(len(string) / 2):
temp = string[i]
string[i] = string[len(string) - i - 1]
string[len(string) - i - 1] = temp
print(string.decode('UTF-8'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment