[ create a new paste ] login | about

Link: http://codepad.org/eRDY42Lj    [ raw code | output | fork ]

CarlFK - Python, pasted on Nov 12:
"""Example Python Program"""

import random

# Create and add to a list
python = []
python.append("Easy to read")
python.append("Fast to code")
python.append("Quick to learn")
python.append("Modular and object oriented")
python.append("Open source and cross platform")

# Shuffle list
random.shuffle(python)

# Loop through list
count = 1
print "Python is ... "
for each in python:
    print count,each
    count += 1

print "Discover more at http://www.python.org"    


Output:
1
2
3
4
5
6
7
Python is ... 
1 Easy to read
2 Quick to learn
3 Fast to code
4 Open source and cross platform
5 Modular and object oriented
Discover more at http://www.python.org


Create a new paste based on this one


Comments: