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
40 views

2 answers to this question.

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,160 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 different types of data types one can use in Python?

Python provides an array of built-in constants, ...READ MORE

answered May 28 in Python by Harsh
• 260 points
15 views
0 votes
1 answer
+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
1,146 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
59 views
+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 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 124 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 49 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,160 points
14 views