Am stack on tuples . Can anyone help me ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Am stack on tuples . Can anyone help me ?

Am not understanding collection data types please someone help me . Mostly dictionaries and sets.

7th Dec 2021, 12:18 PM
Kiire Constantine Pius
Kiire Constantine Pius - avatar
5 Answers
+ 4
Can you be a bit more precise about what it is you're struggling with? to say "not understanding" didn't come as clear on the "which" part ...
7th Dec 2021, 1:26 PM
Ipang
+ 4
Dictionaries
7th Dec 2021, 11:39 PM
Kiire Constantine Pius
Kiire Constantine Pius - avatar
+ 2
It's intermediate python so, help me and upvote my question I really need help
7th Dec 2021, 12:20 PM
Kiire Constantine Pius
Kiire Constantine Pius - avatar
+ 2
Please post complete question. You can learn collection data types by solving more problems using these data types.
7th Dec 2021, 12:23 PM
Neethu Nath
Neethu Nath - avatar
+ 2
Well, you can think of it like a real life dictionary. A dictionary item contains of a pair of key and value. In real life dictionary, let's assume an English ~ German dictionary, the keys are words in English, and the values are the respective translation in German. In real life dictionary we search a word by looking at the markers (marked with letters usually). In programming, the technique is so called "hashing", a way to convert the key to a form that can be searched quickly (technical details are far beyond my league). A dictionary's item key is unique, but an item's value may not be. That means if you add a new item having a key whose value can be translated equal to an existing item, the existing item value will be overwritten by the new value, but the key remains. I hope you now get a rough idea of it. If you have another doubt more specific to dictionary, you are welcome to ask.
8th Dec 2021, 12:52 AM
Ipang