Lists in Python

by matt392 in Circuits > Software

608 Views, 6 Favorites, 0 Comments

Lists in Python

57bf18a367400c7912000006.jpeg
pythonlogo.png

Short program that demonstrates use of lists in Python.

# testing lists
operatingsystems = ["Debian", "Fedora", "OpenSUSE", "Ubuntu", "LinuxMint", "FreeBSD"]
print ("The list of operating systems is: ", operatingsystems)

number = 0

for element in operatingsystems:
print (("Operating system list element:"), number, "is", operatingsystems[number])
number = number + 1

Downloads