Skip to content

Instantly share code, notes, and snippets.

@tardonly
Created August 19, 2017 09:23
Show Gist options
  • Save tardonly/50498b0caf0289c030810dec18ba3fbb to your computer and use it in GitHub Desktop.
Save tardonly/50498b0caf0289c030810dec18ba3fbb to your computer and use it in GitHub Desktop.
Reverse Word Order
a = input("enter line with apostrophe:")
a= a.split()
b=[]
for i in range(len(a)):
b.append(a[len(a)-i-1])
print(b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment