How to Use of dictionary and related methods in python | Full Python Course in Hindi

hey Sushil KE IS VIDEO PYTHON DICTIONARY INTRODUCTION ME FOLLOWING TOPICS PAR PRACTICE AND DETAILS ME BAAT KI GAI HAI:

  1. WHAT IS PYTHON DICTIONARY INTRODUCTION?
  2. WHY PYTHON DICTIONARY IS SO IMPORTANT IN PYTHON?
  3. PYTHON DICTIONARY IS EQUAL TO ASSOCIATIVE ARRAY OR NOT?
  4. WHAT IS THE DIFFERENCE BETWEEN PYTHON DICTIONARY AND ASSOCIATIVE ARRAY?
  5. WHY PYTHON DICTIONARY IS DIVIDED INTO KEY VALUES?

AUR BHI KAI SARE QUESTIONS KA ANSWER HAI IS PYTHON DICTIONARY INTRODUCTION VIDEO ME.

# dictonary

dictonaryval = {'name':'ram','course':'python'}

# Accessing Items
print('\nName: ',dictonaryval['name'])
print('\nCourse: ',dictonaryval.get('course'))

# Change Values
dictonaryval['name'] = 'Mr. Ram'

# Dictionary Length len()

# Adding Items
dictonaryval['mobile'] = 987989879

# Removing Items
dictonaryval.pop('mobile')
dictonaryval.popitem()

# del
del dictonaryval

dictonaryval = {'name':'ram','course':'python'}

# Copy a Dictionary
copydictonary = dictonaryval.copy()

# clear()
dictonaryval.clear()

print('\n\nDetails: ',copydictonary)

# Nested Dictionaries
details = {
'ram': {
    'course':'python',
    'mobile':89798979,
    'email':'ram@gamil.com'
},
'shyam': {
    'course':'python',
    'mobile':89798979,
    'email':'ram@gamil.com'
}
}

print('\nRam',details['ram'])
print('\nShyam',details['shyam'])

heySushil

Software Developer | Python | Data Science | Trainer | Motivation Speaker | Poetry | Animals Lover | Photographer |🧘🏻‍♂️Yoga | YouTube @heykyakaru

Leave a Reply