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,710 points
1,012 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
• 58,020 points
0 votes
There are 4 types of dictionary
Empty
Integer
Mixed
Dictionary with sequence.
answered Feb 14, 2019 by Shashank
• 1,370 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, 2019 in Python by Harsh
• 260 points
3,277 views
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 May 21, 2019 in Python by Mohammad
• 3,230 points
2,070 views
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, 2019 in Python by Arvind
• 3,050 points
715 views
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, 2019 in Python by Neel
• 3,020 points
1,118 views
0 votes
2 answers
+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 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,422 views
0 votes
1 answer
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,790 points
4,042 views
+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,710 points

reshown Aug 24, 2018 by Priyaj 1,336 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
• 58,020 points
636 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP