Professional Documents
Culture Documents
Agenda:
• List
• List comprehension
• Tuples
• Lists are one of 4 built-in data types in Python used to store collections of data, the other 3 are Tuple, Set, and
Dictionary, all with different qualities and usage.
List comprehension:
List comprehension offers a shorter syntax when you want to create a new list based on the values of an
existing list.
Example:
Based on a list of fruits, you want a new list, containing only the fruits with the letter "a" in the name.
Tuples:
• Tuple is one of 4 built-in data types in Python used to store collections of data, the other 3 are List, Set,