Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Created July 16, 2020 01:54
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/2672fdb85a4a6dd51f4598d8f2e41cdc to your computer and use it in GitHub Desktop.
Save IndhumathyChelliah/2672fdb85a4a6dd51f4598d8f2e41cdc to your computer and use it in GitHub Desktop.
#iterable is given as set
t2=tuple({1,2,3,4})
print (t2)#Output:(1, 2, 3, 4)
#iterable is given as dict
t3=tuple({'a':1,'b':2})
#dict keys are converted to tuple
print (t3)#Output:('a', 'b')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment