Data Types - Dictionary Flashcards
1
Q
Can Dictionaries be sliced, and why?
A
No - Python is simply not programmed to support it
2
Q
person = {“name”: “Alice”, “age”: 30}
Give 2 ways to remove “age” from this dictionary
A
del person[“age”]
person.pop(“age”)
.remove() is a method of List