Python Programming, Lists

Опубликовано: 16 Март 2021
на канале: Quick Programming Concepts
406
8

#shorts

This quick video demonstrates using a list in Python. This is intended for those who are new to Python. A list is a construct which can store zero or more values inside of them. Lists can be defined within [ and ], or by using list(). For the purpose of learning lists (and many other purposes in general), it doesn't really matter if you use [ ] or list() to define a list.

Examples:
List of strings
list_var = ['value 1', 'value 2', 'value 2']

List of numbers
list_var2 = [1, 5, 7, 2]

List of strings using list()
list_var3 = list('value 1', 'value 2')