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

Pyhton 3.4 - Continue

Conversations Ongoing: Valuing Modernization in Early European History

Conversations Ongoing: A Bunch of Amateurs