ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

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

user-image
تم إضافة السؤال من قبل Abdul Khader Shaik , IT & Ops Manager , TheSmartlabs
تاريخ النشر: 2018/02/21
NASSER AL-OSTATH
من قبل 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.

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟