diff --git a/code/07-data-structures/simple_dict/playground.py b/code/07-data-structures/simple_dict/playground.py index b8e36eb..cd194a3 100644 --- a/code/07-data-structures/simple_dict/playground.py +++ b/code/07-data-structures/simple_dict/playground.py @@ -2,6 +2,7 @@ # 1. Dictionaries # 2. Lists / arrays [1,1,7,11] # 3. Sets +# 4. Tuples # Lists lst = [1, 1, 11, 7] @@ -12,6 +13,8 @@ print(lst) lst.sort() print(lst) +lst.pop() +print(lst) # Sets: st = {1, 1, 11, 7} @@ -19,6 +22,8 @@ st.add(1) st.add(11) print(st) +st.remove(1) +print(st) # Dictionaries d = { @@ -36,4 +41,12 @@ print(d) print(f"You are defeated by {d['defeated_by']}") print(d.get('other', 42)) +print(d.keys()) +print(d.values()) + +# Tuples +tup1 = (1,1,11,17) +print(tup1) + +