Lists in Python

Published

Introduction: Lists in Python

About: Occupation: Tech Support

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

Share

    Recommendations

    • Clocks Contest

      Clocks Contest
    • Oil Contest

      Oil Contest
    • Planter Challenge

      Planter Challenge
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    Comments