Python Basics

December 23rd, 2009 -- 1 Comment

If you have been reading previous blog posts, I have been using a monitoring tool called Zenoss. Under the hood there is a lot of Python stuff. So I decided to start learning Python. Python can run on Mac, Linux, Unix, and Windows. Let me show you some basic on what you can do in python.

#!/usr/bin/python
 
firstName = "John"
lastName = "Costanzo"
 
# Lets just print out one variable
print firstName
 
# Now lets complete my name
print firstName, lastName
 
# Lets just print something random without a variable
print "The sun is warm. The grass is green"
 
# Now I will print some variables followed by some text
print firstName, lastName, "Is the owner of this blog."

For more information on Python you can visit this site.