Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Created July 16, 2020 00:12
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/ceaa627f0fd45d91eaa3d9a68cc5c6f9 to your computer and use it in GitHub Desktop.
Save IndhumathyChelliah/ceaa627f0fd45d91eaa3d9a68cc5c6f9 to your computer and use it in GitHub Desktop.
#Output is int.If we create tuple with one item , we have to add comma at the end.
t1=(1)
print (t1)
print (type(t1))#Output:<class 'int'>
#Output is a string.So,if we create tuple with one item, we have to add comma , at the end.
t2=('blue')
print (t2) #Output: blue
print (type(t2))#Output:<class 'str'>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment