Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

difference between set and tuple in python

Lists and tuples are standard Python data types that store values in a sequence. Sets are another standard Python data type that also store values. The major difference is that sets, unlike lists or tuples, cannot have multiple occurrences of the same element and store unordered values.
Comment

tuple vs set python

tuple = (1,2,3,4,5,6,7,8,9, 1,2,3) # output: (1,2,3,4,5,6,7,8,9, 1,2,3) will be same
set = (1,2,3,4,5,6,7,8,9, 1,2,3) # output: (1,2,3,4,5,6,7,8,9) // removes the duplicate values
Comment

PREVIOUS NEXT
Code Example
Python :: how to concat on the basis of particular columns in pandas 
Python :: python slack 
Python :: python dictionary default 
Python :: algorithms for Determine the sum of al digits of n 
Python :: python turtle triangle 
Python :: python add to list 
Python :: python dequeu 
Python :: remove dot from number python 
Python :: Python Requests Library Patch Method 
Python :: redirect a post request django 
Python :: how to download a .xlsx file from google colab 
Python :: python tkinter projects 
Python :: d-tale colab 
Python :: joining two lists in python 
Python :: how to reverse a string in python 
Python :: pretty size python 
Python :: how to install tkinter in pycharm 
Python :: python functions with input 
Python :: Mittelwert python 
Python :: copy files to a directory using text file 
Python :: print python float precision 
Python :: dir() in python 
Python :: python sort dict by value 
Python :: distplot in python 
Python :: jupyter notebook plot background dark theme 
Python :: python list comprehension 
Python :: how to append a dataframe to another dataframe in pandas 
Python :: remove in list python 
Python :: how to make text change lines pygame 
Python :: python is dict 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =