Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

what is the difference between tuples and lists in python

The main differnce between Tuples and list is that items from lists 
can be modified I could add or delete items from a list. 
I could modify the list in any sort of way I would want, however, 
at Tuples you can not add or delete items. Tuples are immutable, people 
use tuples for data that is never going to be changed.
Comment

list and tuple difference in python

Lists are used to store multiple items in a single variable.
Whereas Tuples are also used to store multiple items in a single variable.
The difference between them is that A list is changeable whereas Tuple is unchangeable
and also lists are created with Square Brackets but Tuples are created with Round Brackets
Comment

PREVIOUS NEXT
Code Example
Python :: flask sqlalchemy case insensitive like 
Python :: min stack in python 
Python :: unique file name in django 
Python :: pyqt popup yes no 
Python :: change index function for class python 
Python :: how to make a pattern in python in one line 
Python :: using polymorphism in python 
Python :: how to redirect where requests library downloads file python 
Python :: python logging change handler level 
Python :: map in python 
Python :: getting-the-last-element-of-a-list 
Python :: dataframe rolling first eleemnt 
Python :: get object by name blender python 
Python :: python listas por comprension 
Python :: to_datetime with non zero padded values python 
Python :: Sqlalchemy Define class from existing table 
Python :: random number list 
Python :: lru cache 
Python :: multithreaded programming in python 
Python :: pascal triangle 
Python :: from future import division 
Python :: get script text selenium python 
Python :: python bug 
Python :: pandas flip x and y axis 
Python :: import folder from another folder python 
Python :: django pre_save get old instance 
Python :: how to extract column from numpy array 
Python :: custom dataset pytorch 
Python :: Passing Arrays to Methods 
Python :: defaultdict in python 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =