Part 3 | Python Programming | Creating and printing lists

Veröffentlicht am: 31 Dezember 2022
auf dem Kanal: oOSylarTechOo
63
5

This is part 3 of a series of python coding that I am having fun with and want to show others that are interested or stuck.

Code Example:

lists have to be assigned to a variable
lists must have [] brackets and separate each list with a comma.

A list of named fruits.
fruits = ["apple", "banana", "cherry"]

Lists start with 0 from left to right [0, 1, 2, 3...]
fruits[0] will print apple from the list
print(fruits[0])

#...or you can write a list that has assigned variables(This is still using the existing list that has already been created above)
x, y, z = fruits

print(x)
print(y)
print(z)

#python #pythonprogramming #pythontutorial #pythonforbeginners #shorts


Auf dieser Seite können Sie das Online-Video Part 3 | Python Programming | Creating and printing lists mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer oOSylarTechOo 31 Dezember 2022 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 63 Mal angesehen und es wurde von 5 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!