UrbanPro

Learn Python Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

What is an example of a practical use of a dictionary(map) in a Python 3 program?

Asked by Last Modified  

Follow 2
Answer

Please enter your answer

Computer Trainer: Programming & Software Development.

Dictionary in python are used to store key-value pair. Now suppose their are 5 students in a class, having roll no. 1 to 5. Each have Maths, Physics & chemistry as subject. Now suppose we want to PROCESS this data, for example we want to arrange them in decreasing order of marks in Maths, i.e. student...
read more
Dictionary in python are used to store key-value pair. Now suppose their are 5 students in a class, having roll no. 1 to 5. Each have Maths, Physics & chemistry as subject. Now suppose we want to PROCESS this data, for example we want to arrange them in decreasing order of marks in Maths, i.e. student having highest marks marks in maths is at the top of the list. We can write this data in the following way d={1:[54,67,88], 2:[24,67,56], 3:[99,12,78], 4:[55,33,44], 5:[11,58,79]} # where first element of each list is marks of Maths f=sorted(d,key=d.get, reverse=True) for r in f: print(r, d[r][0]) # This gives the output of roll number of students with max to min marks in Maths # OUTPUT 3 99 4 55 1 54 2 24 5 11 I hope this helps you understand how we can use dictionaries in python. read less
Comments

Related Questions

What are the best online courses to learn Python in 2021?
The best online courses to learn python in 2021 are: 1. Complete Python Bootcamp 2022: Go from Zero to Hero in Python 2. Python 3 Tutorial from Codeacademy 3. Python Programming Masterclass 4. The...
Anupam
0 0
6

What are the future career opportunities after Python certification courses?

You can go for many career paths depending upon your interest. The most prominent of them are as follows: Python developer for automation Data Analyst ETL developer Web-Application Developer Machine Learning Expert Data Scientist Data Engineer
Rajnish
What are the best learning sites for Python?
w3school, toturialpoint, leetcode is best for practice,CodeCademy, Udemy,Coursera
Apoorva
1 0
6
I want full details of the Python training, topics covered timing and duration. How much Fee for full course?
We conduct hands-on Python workshop at Kochi with personal attention to each participant. Classes with a batch of l1 or 2 students are also conducted based on the convenience of learner and tutor. Workshop...
Ravi

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

JAVA - Object Cloning
JAVA - Object Cloning Is the way of creating the same copy of object without calling the class constructor. It means we can make any class object multiple times without calling its default constructor....

Python (Concepts and Importance)
Python is a general-purpose, interpreted, object-oriented programming language. Python was created by "G. V. Rossum" in the Netherlands in 1990. Python has become a famous programming language widely used...

Writing Simple Programs in Python
Writing a program, especially for a beginner, is a challenging and daunting task! He/She knows the language but is not able to start. To make things simple, it is advisable to follow a process that is...

The Zen of Python
Writing programs that actually do what they are supposed to do is just one component of being a good python programmer. It's also important to write clean code that is easily understood, even weeks after...

OS Module
1. OS module interacts with your operating system. Use this to create folder, remove folder, move folder, change the working directory. Ex: import oscurDir=os.getcwd() #get current working directoryprint(curDir)os.mkdir('praveen')...

Recommended Articles

Python is one of the most popular programming languages in the world. It is general-purpose, object oriented, high-level programming language used in a number of programming fields. Python is a great programming language to learn as it will introduce you to the world of programming. If you are from the technical background...

Read full article >

Applications engineering is a hot trend in the current IT market.  An applications engineer is responsible for designing and application of technology products relating to various aspects of computing. To accomplish this, he/she has to work collaboratively with the company’s manufacturing, marketing, sales, and customer...

Read full article >

Whether it was the Internet Era of 90s or the Big Data Era of today, Information Technology (IT) has given birth to several lucrative career options for many. Though there will not be a “significant" increase in demand for IT professionals in 2014 as compared to 2013, a “steady” demand for IT professionals is rest assured...

Read full article >

Microsoft Excel is an electronic spreadsheet tool which is commonly used for financial and statistical data processing. It has been developed by Microsoft and forms a major component of the widely used Microsoft Office. From individual users to the top IT companies, Excel is used worldwide. Excel is one of the most important...

Read full article >

Looking for Python Training classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Python Training Classes?

The best tutors for Python Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Python Training with the Best Tutors

The best Tutors for Python Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more