Dictionary in Python

preview_player
Показать описание
Check out our courses:

Coupon: TELUSKO20 (20% Discount)

Coupon: TELUSKO20 (20% Discount)

Udemy Courses:

For More Queries WhatsApp or Call on : +919008963671

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

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']

Editing Monitors :

Editing Laptop :

Mics

More Learning :

Donation:
PayPal Id : navinreddy20
Рекомендации по теме
Комментарии
Автор

Bro thank you so much, i got hired because of you, i owe you alot.

drahcirdexter
Автор

I am a child and learning python from you. You are giving so much knowledge in a funny way. Wow, well done.

ritakashyap
Автор

What a way of teaching 😎 I'm impressed ❤️and i must say that before these lectures I don't know even a single code in python but, now I can write python code and it will work 😎😅.

Sourav.
Автор

Navin, love your videos!
I am studying python to further my career as a network engineer and obtain my PCEP/PCAP certification and CCIE.
You are a GEM Sir. Love your videos. Clear and concise. Appreciate all of your efforts.

stifmeisterkevin
Автор

I have finally discovered the best channel for learning Python. Your teaching style is truly awesome.

nisaazeem
Автор

the way that your conveying the subject its marvelous.... we have no words to say about you.... even small kids also understand your sessions.. really very thankful to navin reddy sir...

lokeshdhannana
Автор

These are short, effective, and easy to follow tutorials. Keep the hard work

mrtitangaming
Автор

Thank you Naveen for this great tutorial
I would like to add some more point about sets
1) To create an empty set use
>>s1 =set()
because if you use
>> s1 = { }
and check >> type(s1)
you will get <class 'dict'>, which means it is treated as an dictionary instead of empty set.

NikSy
Автор

These are so basic yet so confusing concepts! One needs a good practice to be good at this! A good series for clearing all basic doubts. Thank you!

TouringTalesTV
Автор

Thank you so much. I started this few weeks ago. Very Helpful.

samuelofosu-yeboah
Автор

Thank you for the video. Dictionary takes on a whole new meaning on the Internet.

berniv
Автор

As a Beginner for the programming It's very helpful for me understand basics.

arunkundrupu
Автор

Whenever i confused about programing i always open this channel 👍👍👍

deepvasoya
Автор

Sir, I feel very lucky that I find your channel to learn python .Your teaching way is amazing .Thankyou so much sir ❤️

gayatrichaudhary
Автор

Wow really wonderful explanation style with utmost simplicity👌. Grasping and practicing the foundation concepts of Python at the same time with so much ease 👍 Each aspect of dictionary has been explained nicely. Just awesome❤

shankargope
Автор

he taught me the same thing my teacher thought me for 2 months in 12 mins
hats off !

dark_fantom
Автор

This ways perfect for the easily learn about dictionary of python ... thanku sir for the easily teaching..

RohitSingh-dchp
Автор

Very well explained sir thnkuu for helping us all to understand the concepts very easily .its like one of the best video i have watched on dictionary😇😇😇

simranjitkaur
Автор

i never see anyone who teach python like you, awesome video

manishkumarsharma
Автор

Sir u explain awesome...I am 2011 MCA passed out.. was worried how could I learn so many things and keep remember.. but your videos gives positive mindset..thanks a lot
please keep the end screen display after the content is displayed completely, u can keep few extra seconds as buffer to show end screens..Thank u

tanavkote