What is a dictionary in Python?

0 votes
Can someone help me with Dictionary in Python? I am new to Python and finding dictionary complicated to understand. Please help.
Mar 4 in Python by Trisha
11 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Dictionary can be understood as a key-value pair stored together.

dict = {'Name': 'Priyaj', 'Age': 22, 'College': 'TICT'}
print "dict['Name']: ", dict['Name']
print "dict['Age']: ", dict['Age']

Output:

dict[Name]: Priyaj
dict[Age]: 22

This way you can use a dictionary. Hope this helps.

answered Mar 4 by Priyaj
• 56,120 points

Related Questions In Python

0 votes
2 answers

What do you mean by python scripting? What is a script and a module in python?

A scripting language is a programming language ...READ MORE

answered Mar 14 in Python by rajesh kumar
1,614 views
0 votes
1 answer

What is a “method” in Python?

It's a function which is a member ...READ MORE

answered Oct 23, 2018 in Python by SDeb
• 9,540 points
13 views
0 votes
1 answer

What is the process to kill a particular thread in python?

A multiprocessing.Process can p.terminate() In the cases where I want to ...READ MORE

answered Feb 4 in Python by charlie_brown
• 7,710 points
25 views
0 votes
0 answers

what is a name error in python?

why am i getting a name error ...READ MORE

Mar 7 in Python by anonymous
63 views
0 votes
1 answer

how can i count the items in a list?

suppose you have a list a = [0,1,2,3,4,5,6,7,8,9,10] now ...READ MORE

answered May 2 in Python by Mohammad
• 1,400 points
20 views
+4 votes
6 answers
0 votes
1 answer

What is the meaning of “int(a[::-1])” in Python?

Assumming a is a string. The Slice ...READ MORE

answered Aug 27, 2018 in Python by Priyaj
• 56,120 points
46 views
0 votes
2 answers

What is a Tuple in Python and how to use it?

  Tuple is a collection of Python objects.it is ...READ MORE

answered Apr 12 in Python by rajesh
• 1,210 points
46 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.