[python-advocacy] example code

Jason Baker amnorvend at gmail.com
Fri Nov 13 15:55:14 CET 2009


On Fri, Nov 13, 2009 at 4:59 AM, Ray Allen <rayallen153 at googlemail.com> wrote:
> """Example Python Program"""
> import random
> python = [
>         "Easy to read",
>         "Fast to code",
>         "Quick to learn",
>         "Modular and object oriented",
>         "Open source and cross platform",
>         ]
> python.append("Widely adopted")
> random.shuffle(python)
> print "Python is ... "
> for feature in python:
>     print feature
> print "See more examples of Python code at \
> http://wiki.python.org/moin/SimplePrograms"

I like this one.  However, I think it's still just a little on the
complex side for a front-page example.  What about something more like
this:

python = [
        "Easy to read",
        "Fast to code",
        "Quick to learn",
        "Modular and object oriented",
        "Open source and cross platform",
        ]
print "Python is ... "

for feature in python:
    print feature

print "See more examples of Python code at \
http://wiki.python.org/moin/SimplePrograms"


More information about the Advocacy mailing list