Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Created July 16, 2020 01:56
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 IndhumathyChelliah/88bf08c7edede7aab962f3890fedd423 to your computer and use it in GitHub Desktop.
Save IndhumathyChelliah/88bf08c7edede7aab962f3890fedd423 to your computer and use it in GitHub Desktop.
t5=reversed("hello")
#returns an iterator object
print (t5)#Output:<reversed object at 0x0124E610>
#iterator object is given as iterable
t6=tuple(t5)
print (t6)#Output:('o', 'l', 'l', 'e', 'h')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment