Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

What are the lists,tuples in python and how are they different from arrays of C..?

user-image
Question ajoutée par Abdul Khader Shaik , Cyber Crime Lawyer , Grofers
Date de publication: 2018/02/21
NASSER AL-OSTATH
par NASSER AL-OSTATH , Co-Founder , www.pythonat.com

lists are like arrays in C .

tuples are lists but you cannot modify them ( adding, taking off elements )

 

but one of the strong features of python's data structures is dictionaries where you can have something like a list and it's elements are keys and values and looks like this :

my_dict ={'key1':value1 , 'key2':value2 ..... } where you can think of the key as a definition and the value is the explanation of that definition , just like a real dictionary. 

 

or

 

keys are variables and values are whatever you set them to be for each key.

More Questions Like This