Answers for "what are tuples used for in python"

10

python tuple vs list

#tuples and lists are the same thing, but a tuple cannot be changed
tup = (1,'string',True)
lst = ['hiya',23545,None]
Posted by: Guest on March-26-2020
4

tuple in python

#a tuple is basically the same thing as a
#list, except that it can not be modified.
tup = ('a','b','c')
Posted by: Guest on March-14-2020

Code answers related to "what are tuples used for in python"

Python Answers by Framework

Browse Popular Code Answers by Language