What are the types of dictionary in python?

0 votes
What is dictionary and what are the types of it?
Jul 16, 2018 in Python by eatcodesleeprepeat
• 4,670 points
35 views

2 answers to this question.

Your answer

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

It is basically a data type in python. Dictionary is created by using {}.

The different types of dictionary are as follows:-

Empty dictionary

Eg:- myDict= {}  

Integer dictionary

Eg:- myDict= {1:’Apple’, 2:’Ball’, 3:’Cat’}

Mixed dictionary

Eg:- myDict={‘name’:’Rahul’,1:[2,3,4]}

Sequence having each item as a pair

Eg:- myDict={[(1,’Apple’),(2,’Ball’)]}

answered Jul 16, 2018 by Priyaj
• 56,120 points
0 votes
There are 4 types of dictionary
Empty
Integer
Mixed
Dictionary with sequence.
answered Feb 14 by Shashank
• 1,350 points

Related Questions In Python

0 votes
1 answer

What are the naming conventions for variables and data types in python?

There are certain rules that we have ...READ MORE

answered 5 days ago in Python by Mohammad
• 1,400 points
11 views
+2 votes
3 answers

what is the practical use of polymorphism in Python?

Polymorphism is the ability to present the ...READ MORE

answered Mar 31, 2018 in Python by anto.trigg4
• 3,420 points
968 views
0 votes
1 answer

What is the use of raw_input function in Python?

raw_input fuction is no longer available in ...READ MORE

answered May 2, 2018 in Python by aayushi
• 750 points
38 views
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
49 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
24 views
+4 votes
6 answers
+1 vote
3 answers

What are the ways of detecting outliners in Python

code from http://eurekastatistics.com/using-the-median-absolute-deviation-to-find-outliers  This uses the L1 distance ...READ MORE

answered Aug 24, 2018 in Python by eatcodesleeprepeat
• 4,670 points

reshown Aug 24, 2018 by Priyaj 40 views
0 votes
1 answer

What are the key features of Python?

If it makes for an introductory language ...READ MORE

answered Jul 20, 2018 in Python by Priyaj
• 56,120 points
13 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.