Dictionary Methods in Python


There are some dictionary methods in python which are given below −

Sr.No Method Name & Description
1

Python Dictionary clear()

clear all Items

2

Python Dictionary copy()

Copy of a Dictionary

3

Python Dictionary from keys()

creates dictionary from given sequence

4

Python Dictionary get()

get Value of The Key

5

Python Dictionary items()

view of dictionary's items

6

Python Dictionary keys()

view all keys

7

Python Dictionary pop item()

Removes all element From Dictionary

8

Python Dictionary set default()

Inserts Key With a Value if Key is not Present

9

Python Dictionary pop()

removes element having given key

10

Python Dictionary values()

returns view of all values in dictionary

11

Python Dictionary update()

Updates the Dictionary

12

Python any()

Checks if any iterable element is True

13

Python all()

returns true when all iterable elements is true

14

Python ascii()

Returns String Containing Printable Representation

15

Python bool()

Converts a Value to Boolean

16

Python dict()

Creates a Dictionary

17

Python enumerate()

Returns an Enumerate Object

18

Python filter()

constructs iterator from elements which are true.

19

Python iter()

returns iterator for an object

20

Python len()

Returns Length of an Object

21

Python max()

returns largest element of sequence

22

Python min()

returns smallest element of sequence

23

Python map()

Applies Function and Returns a List

24

Python sorted()

returns sorted list from a given sequence

25

Python sum()

Add items of data

26

Python zip()

Returns an Iterator of Tuples

karthikeya Boyini
karthikeya Boyini

I love programming (: That's all I know

Updated on: 30-Jul-2019

271 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements