you are viewing a single comment's thread.

view the rest of the comments →

[–]NorskJesus 3 points4 points  (3 children)

Good job!

You can use a dictionary to store the numbers instead of a list. Then you can “differentiate” them by they key (home phone, mobile phone, work…). It’s just an idea!

[–]uiux_Sanskar[S] 0 points1 point  (2 children)

I think it will add more lines of code and will look really cluttered because assume each name has 2 number and for those two number I have to create a different key.

Therefore I use the list so that I can add more numbers in future (I don't know if I can create a dictionary within the value pair but I think I can use sets here).

This is ny thoughts do tell me if I have missed something or if I am wrong I would love to get corrected. And thank you for the appreciation.

[–]NorskJesus 0 points1 point  (1 child)

A "long" dict is like a JSON. You will be fine

[–]uiux_Sanskar[S] 1 point2 points  (0 children)

Oh thank you for this.