1# There is several possible ways if "finding" things in lists.
2'Checking if something is inside'
33 in [1, 2, 3] # => True
4'Filtering a collection'
5matches = [x for x in lst if fulfills_some_condition(x)]
6matches = filter(fulfills_some_condition, lst)
7matches = (x for x in lst if x > 6)
8'Finding the first occurrence'
9next(x for x in lst if ...)
10next((x for x in lst if ...), [default value])
11'Finding the location of an item'
12[1,2,3].index(2) # => 1
13[1,2,3,2].index(2) # => 1
14[1,2,3].index(4) # => ValueError
15[i for i,x in enumerate([1,2,3,2]) if x==2] # => [1, 3]
1# app.py
2
3streaming = ['netflix', 'hulu', 'disney+', 'appletv+']
4
5index = streaming.index('disney+')
6print('The index of disney+ is:', index)