Python Dictionary Part-3

Q-1.Write a Python program to remove duplicates from Dictionary. Input: student_data ={‘rollno_1’:{‘name’: ‘Sara’ ,’class’: ‘V’, ‘subjects’: [‘english, math, science’]}, ‘rollno_2’:{‘name’:’David’, ‘class’: ‘V’, ‘subjects’: [‘english, math, science’]}, ‘rollno_3’:{‘name’:’Sara’, ‘class’: ‘V’, ‘subjects’: Read more…

Python Dictionary Part-2

Q-1.Write a Python program to map two lists into a dictionary. Input: keys = [‘red’, ‘green’, ‘blue’] values = [‘#FF0000′,’#008000’, ‘#0000FF’] Output:{‘red’: ‘#FF0000’, ‘green’: ‘#008000’, ‘blue’: ‘#0000FF’} Python Code: Q-2.Write Read more…

Insert math as
Block
Inline
Additional settings
Formula color
Text color
#333333
Type math using LaTeX
Preview
\({}\)
Nothing to preview
Insert