I am finding it difficult to iterate through a dictionary in python.
I have already finished learning via CodeAcademy and solo learn but still find it tough to go through a dictionary.
Are there any good resources other than official documentation of Python to learn more and given in lucid language where I can be more comfortable with python.
Lots of different documentations and tutorial resources available for Python online, almost each of them are helpful depending upon your need. But most reliable documentation is official documentation of Python website.
Also please watch youtube videos of the same, many videos of practical implementation of dictionaries and other Python constructs are available in easy to understandable manner.
Here is sample program for dictionary implementation:
my_dict = {'name':'Deadpool', 'designation': 'developer'}
print(my_dict)
Output: { 'designation': developer, 'name': Deadpool}
# update value
my_dict['designation'] = 'sr developer'
#Output: {'designation': sr developer, 'name': Deadpool}
print(my_dict)
# add an item to existing dictionary
my_dict['address'] = 'New York'
print(my_dict)
# Output: {'address': New York, 'designation': sr developer, 'name': Deadpool}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With