Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Python dictionaries are easy ๐Ÿ“™
Play lesson

Python tutorial for beginners ๐Ÿ - Python dictionaries are easy ๐Ÿ“™

4.0 (0)
8 learners

What you'll learn

This course includes

  • 14.3 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

#python #tutorial #course # dictionary = a collection of {key:value} pairs # ordered and changeable. No duplicates capitals = {"USA": "Washington D.C.", "India": "New Delhi", "China": "Beijing", "Russia": "Moscow"} # print(dir(capitals)) # print(help(capitals)) # print(capitals.get("Japan")) # if capitals.get("Russia"): # print("That capital exists") # else: # print("That capital doesn't exist") # capitals.update({"Germany": "Berlin"}) # capitals.update({"USA": "Detroit"}) # capitals.pop("China") # capitals.popitem() # capitals.clear() # keys = capitals.keys() # for key in capitals.keys(): # print(key) # values = capitals.values() # for value in capitals.values(): # print(value) # items = capitals.items() # for key, value in capitals.items(): # print(f"{key}: {value}")

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere