Answers for "tuples vs lists"

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
2

list vs tuple python

mylist : list = [] # <-- a list variable can be defined either as [] or <varname> : list
mytuple : tuple = () # <-- a tuple variable can be defined either as () or <varname> : tuple
Posted by: Guest on December-24-2020

Code answers related to "tuples vs lists"

Python Answers by Framework

Browse Popular Code Answers by Language