Newest Visitor Badge Earned!
Click to create an account and start competing today!
After Hours Programming
Show Tutorials


You (Level 0)
0/25
Last Badge Earned
Newest Visitor

Python Introduction Tutorial

Python Introduction

The Python Introduction tutorial explains how and where to start writing Python for the server side.

First, off Python usually requires some setup by downloading the Python IDLE. The Python IDLE is basically a text editor that lets you execute Python code. If you want to use Python as a server-side language, you certainly can. Python can output HTML just like other languages can, but Python is more commonly used as a module rather than intertwined like some PHP or ColdFusion. As for right now, I recommend you download the IDLE to help you debug your code while we learn the fundamentals offline. One really quick note, we are using python 3.2. Before we go to an example, please understand that Python is space sensitive. This means you must have 4 spaces for each indentation every single time. We'll get into this more later, now let's go to an example.

Example print ("My first Python code!")
print ("easier than I expected")
Result My first Python Code!
easier than I expected

You can see right off the bat, that we use print() a whole lot. Basically, all it does is output whatever is inside the parentheses. You will be doing lots of printing so, you can get more comfortable with it as we go. Print is a function that we will go into later, but just understand that it can take a value. On the first line, we provide a string value "My first Python code!", which is a string because of the quotes. So, you just told Python to output that string to the console. Python completes that task and moves onto the next line where it prints out a different string.

See how simple that was? Well, get used to it. Python is probably one of the simplest looking languages that can do some of the most powerful things you can imagine. You can see from the example how clean Python's syntax is without all of the extra stuff that other languages add. That covers the easiest Python statement you will ever write. In the following sections, we will be using more advanced functions and teaching you the fundamentals of Python.

Try testing your code with the code simulator!

Let's move on to some more tutorials or the next section!



Previous Tutorial

Overview

Next Tutorial

Comments







If you enjoyed this resource, support me by sharing this page with others.

Stumbleupon Facebook Twitter GooglePlus Reddit Delicious Digg


Comment or Suggestion?

Comments are a way to tell me about corrections or suggestions, what you thought about the resource, or providing additional information. Help feed the discussion!


Yes




Comments on Python Introduction

user
lcsszz
July 23, 2014 05:07AM
Add more examples and vedios about this language 


user
Renato
50
July 22, 2014 07:24AM
http://www.python.org/getit/ don't work.


user
joel kone
July 9, 2014 12:31PM
yayyyyyyyyyyyyyyyyyyyyyyyyy i like a lot so far


user
pymp daddio
July 3, 2014 02:30AM
Peeeeennnniiiisss pppppppeeeeeennnnniiiiusssss


user
Mario Bor
July 2, 2014 01:51PM
so far so good for a newbie like me . 


user
CS Cheong
June 29, 2014 09:50AM
I have not been doing programming since the Basic days.  Python provides me free access to programming again.  Thanks.


user
abdullah anisetty
75
June 29, 2014 09:07AM
print("best website to learn computer language")
print("*_#")


user
Clau Lacatus
125
June 28, 2014 01:53AM
Yeahoo!! The greatest teaching website for a newbie (like me)! :) Thanks to owner & colaborators!


user
edward
June 20, 2014 01:35AM
I Amm a geniuuss.,(Excus my splling and gramar


user
Alina
125
June 17, 2014 06:48PM
So far, so good.


user
Xenobot
75
June 17, 2014 04:13PM
It's great so far!


user
jared drake
25
June 15, 2014 11:56AM
this is really sick guys


user
jared drake
25
June 15, 2014 11:56AM
wow this is cool


user
NoiselessFavre
200
June 11, 2014 09:50PM
oops. accidentally scrolled down too much


user
NoiselessFavre
200
June 11, 2014 09:34PM
print ("my first python code!")
print ("easier than I expected")


user
Zou Chang
June 10, 2014 11:12PM
The simulator seems can't handle "isupper()" and "islower" statements.


user
Herf1
75
June 2, 2014 03:54PM
Simple enough,though I was expecting as much.FUN


user
henry smith
June 2, 2014 01:25AM
this is the worst website I have ever used


user
Robert O Donovan
May 29, 2014 08:02AM
Really enjoyed this tutorial, quite funny also, thanks :)


user
Bob Evans
575
May 28, 2014 12:18PM
I like the whole print thing, though I keep forgetting the parentheses.


user
soumitra
May 28, 2014 03:14AM
moving to next tutorial not intuitive


user
Prince
May 24, 2014 07:25PM
Am  a begginer 


user
Nazar
100
May 22, 2014 11:50PM
tutorialnya mantap


user
Gaurav Kulkarni
75
May 22, 2014 10:02PM
Your python IDLE link is broken.. However this one here works out well.. https://www.python.org/download/ .. Very simple and explanatory tutorials.. great work!


user
Luis Arce
100
May 22, 2014 10:58AM
I am excited to learn Python!


user
haborym
75
May 16, 2014 07:56PM
Great and easy


user
arpit Jain
May 12, 2014 04:49AM
I am a beginner in python it will be great if u share some lehman links or pdfs or videos links


user
Milan
25
May 4, 2014 03:27AM
Baby Step//////


user
C-Mack
May 2, 2014 01:37AM
Need an 05 V6 Clio Twin Turbo


user
Marcus D
125
May 1, 2014 04:40PM
should be very helpful, especially with learning