Do I need to initiate an empty list before list comprehension?

Is there a good reason to initiate the empty list variable first ?

It still works if I omit can_ride_coaster = [] before building the new list, and still gives a valid zero length list even if the height parameter is set so we get an empty list.

If using a list comprehension, then no. If using a loop with iterative assignments, then yes.

a = []
for x in range(10):
    a.append(x * 10)

vs.

a = [x * 10 for x in range(10)]
2 Likes