CH4 - Working With Lists Flashcards
What is a For Loop?
A For Loop allows you to take action or set of actions with all elements in a list.
What is the most common way to automate repetitive tasks?
For Loop.
Will a For Loop create a Temp variable?
Yes.
Will the For Loop statement continue until the last element in a list?
Yes.
The symbol for the end of For Loop?
Colon = :
What does a colon: at the end of the statement mean?
To expect a loop.
What is a range()
Python function counts every digit in the list.
What is a list()
Python function used to create a list.
When should code be indented?
After the For Loop statement.
What is a min()
Python function. Finds the minimal digit in a list.
What is a max()
Python function. Finds the maximal digit in a list.
What is a sum()
Python function. Finds the sum of numbers in a list.
What is a slice?
Works with a specific group of elements within a list.
What is slicing?
Specify the index position of the 1st & last element on a list. EXP: [0:3]
What is a tuple?
An immutable list.