can you give an example to get a random sample dictionary

0 votes
And a few operations as well.
May 11, 2019 in Python by Waseem
• 4,540 points
370 views

1 answer to this question.

0 votes

Check below code

thisdict = {
  "1": "C language",
  "2": "Java Language",
  "4": "Python Language",
  "3": "C++",
}
maxNumber= max(thisdict,key=thisdict.get)
print(maxNumber)
minNumber = min(thisdict,key=thisdict.get)
print(minNumber)
Refer this link for different dictionary operations with examples.
answered Nov 25, 2021 by anonymous

Related Questions In Python

0 votes
1 answer

I want to download a file from the website by web scraping. Can anyone explain how to do this in jupyter lab (python) with an example?

Hey, Web scraping is a technique to automatically ...READ MORE

answered Apr 7, 2020 in Python by Gitika
• 65,910 points
2,101 views
0 votes
1 answer

How to correctly return an a dictionary as an output in zappier code using python?

David here, from the Zapier Platform team. ...READ MORE

answered Dec 3, 2018 in Python by charlie_brown
• 7,720 points
1,353 views
0 votes
2 answers

How do you convert a dictionary to a defaultdict?

from collections import defaultdict a = {1: 2, ...READ MORE

answered Aug 2, 2019 in Python by Mohammad
• 3,230 points
8,868 views
0 votes
1 answer
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,058 views
0 votes
1 answer
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,790 points
3,479 views
0 votes
2 answers

Find the largest value in a dictionary

Use below running code which is simple ...READ MORE

answered Nov 25, 2021 in Python by Suhas
953 views
0 votes
2 answers

Get key by value in dictionary

I have slightly modified your program to ...READ MORE

answered Nov 25, 2021 in Python by Python Coder
581 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP