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

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,920 points
0 votes
There are 4 types of dictionary
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
0 votes
1 answer
0 votes
1 answer

What is the use of '==' operator in dictionary in Python?

Yes you can use '==' operator to ...READ MORE

answered Jul 24 in Python by Arvind
• 2,960 points
0 votes
1 answer

What are the arguments of sorted() function in Python?

Sorted() sorts any sequence (list, tuple) and ...READ MORE

answered Jul 29 in Python by Neel
• 3,010 points
+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 346 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 79 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,920 points