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
102 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 4 days ago 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,970 points
907 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,780 points
679 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
5,715 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 2,476 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,810 points
1,857 views
0 votes
2 answers

Find the largest value in a dictionary

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

answered 4 days ago in Python by Suhas
369 views
0 votes
2 answers

Get key by value in dictionary

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

answered 4 days ago in Python by Python Coder
154 views