Python 3.4 - Dictionary

Dictionaries contain words and definitions. Or a keyword and what is value is. You can store information(data) this way in python. You make a dictionary with a list of keys:values and then use those values however you'd like. Below I have a list of keys (cats) and their corresponding values (how special they are).

Again, there's lots we can do with dictionaries:

https://www.python-course.eu/dictionaries.php

kitties = {'Lizzy': ' so special', 'stretch': ' super special', 'bronte': ' special too'}

for k, v in kitties.items():
    print(k + v, "Good Kitty")


https://www.youtube.com/watch?v=BSNFRKG1MfE

Comments

Popular posts from this blog

Python 3.4 - Caesar Cipher

UML - Use Case Diagram