Dictionary in Python

Veröffentlicht am: 28 Januar 2020
auf dem Kanal: Telusko
1,432,792
21k

Check out our courses:

Spring Framework 8 Full-Day Course Live: https://go.telusko.com/Springin8
Coupon: TELUSKO10 (10% Discount)

Complete Java Developer Course Batch-3: https://go.telusko.com/completebatch3
Coupon: TELUSKO10 (10% Discount)

Enterprise Java Spring Microservices: https://go.telusko.com/enterpriseJava
Coupon: TELUSKO10 (10% Discount)

Master Java Spring Development : https://go.telusko.com/masterjava
Coupon: TELUSKO20 (20% Discount)

Udemy Courses:

Spring: https://go.telusko.com/udemyteluskosp...
Java:- https://go.telusko.com/udemyteluskojava
Java Spring:- https://go.telusko.com/Udemyjavaspring
Java For Programmers:- https://go.telusko.com/javaProgrammers
Python : https://go.telusko.com/udemyteluskopy...
Git : https://go.telusko.com/udemyteluskogit
Docker : https://go.telusko.com/udemyteluskodo...

For More Queries WhatsApp or Call on : +919008963671

website : https://courses.telusko.com/

Instagram :   / navinreddyofficial  
Linkedin :   / navinreddy20  
TELUSKO Android App : https://bit.ly/TeluskoApp

In this lecture we are discussing about Dictionary:
-- if you want to accessing the data by using key then we are using dictionary
-- Dictionary uses key and value pair
key and value
in python
data={1:'Navin',2:'kiran',4:'Harsh'} # 1 is key and Navin is value and 2 is key and kiran is value and 4 is key and Harsh is value

property of dictionary:
-- key must be immutable and unique
immutable means we can't change the value
unique means we can't repeat the key
-- value can be anything
-- we can access the value by using key
-- we can't access the value by using index
-- we can't access the value by using value


fetching the value from dictionary
data[4] # we can access the value by using key here key is 4
data[3] # you get error because key is not present in dictionary

get() method:
-- we can access the value by using get() method
-- if key is present in dictionary then it will return the value
-- if key is not present in dictionary then it will return None
data.get(1)
data.get(3) # not get anything
print(data.get(3)) # it will return None
data.get(1,'Not Found')
data.get(3,'Not Found')

use of zip() method:
-- we can combine the two list by using zip() method
-- it will return the tuple
keys = ['Navin','Kiran','Harsh']
values=['Python','Java','JS']

use of dict() method:
-- we can convert the tuple into dictionary by using dict() method
data=dict(zip(keys,values))
data['Kiran']
data['Monika'] # it will give error because key is not present in dictionary

add the value in dictionary:
data['Monika']='CS'
data

delete the value from dictionary:
del data['Harsh']

Nested Dictionary:
-- we can store the dictionary inside the dictionary
prog={'JS':'Atom','CS':'VS','Python':['Pycharm','Sublime'],'Java':{'JSE':'Netbeans','JEE':'Eclipse'}}
prog
prog['JS']
prog['python'][1]
prog['Java']
prog['Java']['JEE']


Spring Full Course : https://courses.telusko.com/learn/Spr...
Python for Beginners :- http://bit.ly/3JOLQhl

Rest API in Spring Boot : https://goo.gl/5Wgsk6
Restful Web Services Tutorial : https://goo.gl/3mosnz
Spring Boot Tutorials : https://goo.gl/7894NE


Editing Monitors :
https://amzn.to/2RfKWgL
https://amzn.to/2Q665JW
https://amzn.to/2OUP21a.

Editing Laptop :
ASUS ROG Strix - (new version) https://amzn.to/2RhumwO
Asus vivoBook :https://amzn.to/2wS0Hpt

Camera : https://amzn.to/2OR56AV
lens : https://amzn.to/2JihtQo

Mics
https://amzn.to/2RlIe9F
https://amzn.to/2yDkx5F
https://amzn.to/2WYqLde

Java:- https://bit.ly/JavaUdemyTelusko
Spring:- https://bit.ly/SpringUdemyTelusko

More Learning :

Java :- https://bit.ly/3x6rr0N
Python :- https://bit.ly/3GRc7JX
Django :- https://bit.ly/3MmoJK6

JavaScript :- https://bit.ly/3tiAlHo
Node JS :- https://bit.ly/3GT4liq

Rest Api :-https://bit.ly/3MjhZwt
Servlet :- https://bit.ly/3Q7eA7k
Spring Framework :- https://bit.ly/3xi7buh
Design Patterns in Java :- https://bit.ly/3MocXiq
Docker :- https://bit.ly/3xjWzLA

Blockchain Tutorial :- https://bit.ly/3NSbOkc
Corda Tutorial:- https://bit.ly/3thbUKa
Hyperledger Fabric :- https://bit.ly/38RZCRB

NoSQL Tutorial :- https://bit.ly/3aJpRuc
Mysql Tutorial :- https://bit.ly/3thpr4L

Data Structures using Java :- https://bit.ly/3MuJa7S
Git Tutorial :- https://bit.ly/3NXyCPu

Donation:
PayPal Id : navinreddy20
https://www.telusko.com


Auf dieser Seite können Sie das Online-Video Dictionary in Python mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Telusko 28 Januar 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 1,432,792 Mal angesehen und es wurde von 21 tausend den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!