Python First Day
Python First Day
Hello World
print “hello world”
Prints hello world to
standard out
Open IDLE and try it out
yourself
Follow along using IDLE
Assign a string to a
variable
In this case “hw”
hw.title()
hw.upper()
hw.isdigit()
hw.islower()
if and else
if variable == condition:
#do something based on v == c
else:
#do something based on v != c
elif allows for additional branching
if condition:
elif another condition:
…
else: #none of the above
Python Homepage
http://www.python.org/
Dive Into Python
http://www.diveintopython.org/
Learning Python, 3rd Edition
http://www.oreilly.com/catalog/9780596513986/
Getting Started Writing Geoprocessing Scripts
Available on ESRI's support page