Do Now 2.06b
Rank the topics below most to least confusing:
- Length of lists
- Appending elements from a list
- Indexing into Lists
- Popping elements off a list
- Slicing lists
- Adding elements to a list
- Creating lists
- Removing elements from a list
Open up the console and type the following examples into your console.
(Answer the questions in your notebook)
Example 1
a = ['cats', 'dogs', 'pigs']
- How would you check if an item was in a three element list?
- What if the list was much longer?
Try typing in the following code:
```python a = [‘cats’, ‘dogs’, ‘pigs’] print(‘dogs’ in a) print(‘cows’ in a) ``’