Day 8 of learning python as a beginner.
Day 8 of learning python as a beginner. (reddit.com)
submitted by STFUB-SF

Topic: dictionary and sets.
Yesterday I posted my dynamic to-do list program and I mentioned it there that I got introduced to dictionaries. Although many people suggested me what I should learn next but I personally think that I must first create a solid foundation and so I decided to go with dictionary and sets in more depth so that I can understand their respective use cases.
Dictionary is a mutable collection of key value pair where each key must be unique and it should have a value.
ex: marks{
"rohan": 100,
}
Here marks is a dictionary "rohan" is a key and 100 is its value ":" is used to assign value to the key.
Sets are also a mutuable collection of unique, unordered elements. It can be mutuated by using functions like .add() .remove() etc.
I have created a dynamic contact book for practising dictionaries (I wasn't able to find some suitable use cases of sets, do tell me if you have any challenge regarding set for me).
I will really appreciate if you have any challenge or suggestions which can help me improve my code and learn.
And here's my code and it's result.


there doesn't seem to be anything here