Put in order · Python course · Module 2: Data Structures

Creating and Filtering a List

Arrange the program steps in order:

Items to put in order

  • if len(a) > 4:
  • for a in animals:
  • animals = ['Tiger', 'Elephant', 'Python']
  • print(a)
Show the answer

Correct order:

  1. animals = ['Tiger', 'Elephant', 'Python']
  2. for a in animals:
  3. if len(a) > 4:
  4. print(a)