0% found this document useful (0 votes)
54 views

Python Training Topics

Vibrant Technologies is headquarted in Mumbai,India.We are the best Python training provider in Navi Mumbai who provides Live Projects to students.We provide Corporate Training also.We are Best Python classes in Mumbai according to our students and corporators contact us on : vibranttechnologies.co.in
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views

Python Training Topics

Vibrant Technologies is headquarted in Mumbai,India.We are the best Python training provider in Navi Mumbai who provides Live Projects to students.We provide Corporate Training also.We are Best Python classes in Mumbai according to our students and corporators contact us on : vibranttechnologies.co.in
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

WELCOME TO VIBRANT

TECHNOLOGIES & COMPUTERS


--------------------------------------------------ONLINE PYTHON PDF

Python
Dictionaries

Dictionary overview Creating


Dictionaries
Dictionary operations
Dictionaries Data structure

objectives
1.

Describe the characteristics of the dictionary data


structure in Python
2. Perform basic operations with dictionaries including
creation, copying, updating, and traversing
3. Use dictionaries in functions

The dictionary data structure


In Python, a dictionary is mapping between a set of indices
(keys) and a set of values
The items in a dictionary are key-value pairs

The dictionary data structure


Keys can be any Python data type
Because keys are used for indexing, they
should be immutable
Values can be any Python data type
Values can be mutable or immutable

AVD

Dictionary indexing

if 'five' in eng2sp:
print eng2sp['five']

print eng2sp.get('five')

The in operator
Note that the in operator works differently for dictionaries
than for other sequences
For offset indexed sequences (strings, lists, tuples), x
in y checks to see whether x is an item in the sequence
For dictionaries, x in y checks to see whether x is a
key in the dictionary

Keys and values

The keys method returns a list of the keys in a dictionary


print eng2sp.keys()
The values method returns a list of the values
print eng2sp.values()

Thank You

You might also like