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 :: while loop python 
Python :: buscar valor aleatorio de una lista python 
Python :: multiple boxplots python 
Python :: get required packages from python project 
Python :: seaborn and matplotlib Setting the xlim and ylim python 
Python :: python extract specific keys from dictionary 
Python :: catch error data with except python 
Python :: python how to delete from dictionary a nan key 
Python :: python dictionary get 
Python :: python datetime object 
Python :: redirect parameters flask 
Python :: merge subplot matplotlib 
Python :: what is the difference between python 2 and 3 
Python :: how to make a button in python turtle 
Python :: display data from database in django 
Python :: dataframe select data type 
Python :: python is folder or file 
Python :: print type error python 
Python :: exclude last value of an array python 
Python :: Return the number of times that the string "hi" appears anywhere in the given string. python 
Python :: pandas print a single row 
Python :: displaying cv2.imshow on specific window position 
Python :: tokenizer in keras 
Python :: create or append dataframe to csv python 
Python :: python multiplication array 
Python :: django slug int url mapping 
Python :: kivy button disable 
Python :: data normalization python 
Python :: set xlim histogram python 
Python :: django production 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =