Answers for "why tuples and list needed in python"

1

tuple and list in python

#to create a tuple you use ( ) :
myTuple = ()
#but to create a list you use [ ] :
myList = []
#tuples cannot be changed while the lists can be modified but Tuples are
#more memory efficient
Posted by: Guest on July-09-2021

Python Answers by Framework

Browse Popular Code Answers by Language