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.
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.
awesome tuts
LOL Kayle O.
Hello,
Very simple tutorial and very instructive
Thanks a lot.
Thx alot very helpful. Python is great for a first language
Nice introduction, simple yet effective.
Love learning python from you guys!
Ok, start to learn
Fantastic for complete beginners (like myself :P) 😀
I want to compare lists how can I do that?! By the way great so far
Hello World!!!
Love how you have the compiler build into the webpage!
One step at a time… thanks for the first step 🙂
cool stuffs!!
That was an awesome start to learning thank you very much. I also felt that it was very informative.
Have I fill this to process?
Nice & Simple explained
Cool that was easy
Great,but pls i am using python 3.3.3 and wheneve it starts it shows something like this
>>> i can only make one command at a time because if i should make a second command it says syntax error,pls help
So useful, thanks for this tuto.
work very well than i thought
It is easier than I expected. Hope it is all this easy to learn!
done here.
Pretty simple and straight forward. I’m really excited to see where this can go. I was going to sign up for Treehouse, but I think I try this some first.
Why do I have to give feedback to go to the next tutorial?
Not sure, since I know nothing about programming and I’m only on the first page of the first tutorial. Posting to try to move forward
Lovely tutorial! The ‘Great’ rating doesn’t even begin to describe how relieved I feel.
I had tried previously to learn Python by using the built-in terminal on my Mac, by typing ‘Python’ and then ‘help’, but as I thought, it only provided definitions of terms, and not any real help. I also tried many online video tutorials and even the ‘official’ Python website’s tutorial (with some major successes), but the website kept using language I had not yet learned so the vast majority of the time I spent trying learn, I didn’t understand the exceptions to lists and functions etc., and other informations that is important to know if you’d like to learn this language.
This tutorial is PERFECT for beginners or somewhat-novices like me, and I think I have finally found the best way to learn HTML and (if they have the tutorial) C, after Python.
Thank you for a great website and an easy, productive tutorial!
Hi I have the same issue like Aeron.
For some reason the lines on my shell are not numbered it simply has ">>>"; can someone help me figure it out please?
I look forward on seeing more, very interested in this!
Great tutorials, i have searched for quite a while to find a tutorial that is aimed at beginners, most assume you have some programming knowledge and seem to get you lost but this one is much more straight forward. Keep up the good work.
Great Tutorials.
its really to beginners…. thanks to development team…
Nice first step, many thanks for this good job.
Whoa! I Love Python!
So far so good.
I am so loving this!
Test Code is not working!
I’m loving this also allready
Good so far.
Just starting.
should be very helpful, especially with learning
Baby Step//////
Great and easy
I am excited to learn Python!
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!
tutorialnya mantap
I like the whole print thing, though I keep forgetting the parentheses.
Simple enough,though I was expecting as much.FUN
print ("my first python code!")
print ("easier than I expected")
oops. accidentally scrolled down too much
wow this is cool
this is really sick guys
It’s great so far!
So far, so good.
Yeahoo!! The greatest teaching website for a newbie (like me)! 🙂 Thanks to owner & colaborators!
print("best website to learn computer language")
print("*_#")
good
The next day. i tried again. but this time. with C++. my sister and my dad came in at the same time ravageously. i jumped out the window. my life is now more ruined
Try again Buddy
I am using Python 2.7.6 on my Ubuntu 14 machine. Will at least most of the commands be the same as 3.x?
I am using Python IDLE to practice. When I type in 1 line of code and hit “enter” to move to the next line, it runs the line of code I wrote e.g.
>>>print (” My first line of Python code!”)
My first line of Python code!
>>>print (“easier than I expected”)
easier than I expected
The same thing happens when I am running Python in the Terminal Window. How do I get to the next line without running the code? Is the only way to use a test editor?
Very well put. Appreciate the effort very much.
I am being curious after I got It in first level
good
amazing
It is so nice and fun!
Try this out….
a = (“My first Python code “)
b = (“it’s easier than I expected!”)
print(a+b)
Notice the space after the word “code”. Try without the space.
A nuu Cheeki Breeki iv Damke
Hi, in IDLE I am only able to execute one statement at a time. This means that I am unable to complete this example. Is there a different IDE that I should be using?
Real easy to follow.
I like your approach in teaching and explaining.
Im 17 years old from Philippines. Im new here and also in programming 🙂 Hello guys 😀
print (“Im so handsome”)
Hi guys!!! I am a newbie in programming!! ^_^’
Hello! I’m a newbie.
Can anyone please explain for me what is the different if I use ‘ and “
Suggestion: If you have any kind of control on the code simulator, it would make much more sense to have the result pane AFTER the coding pane. This to avoid scrolling up and down to check result.
Thanks
Nice and straight forward.
Simple I want to learn as much as I possibly can….
Print(“Hello Programmers”)
Hello Programmers
Python is powerful.
It’s nice and fun.
????
Confused
comment
very good
Hi guys! I’m new here 😀
okay
there are supposed to be pdf files for this course. its actually well constructed
print (“I want you”)
print (“I want you”)
Hey, this page says “For a more tangible and better look into the Python language, consider reading the following book. It’s an excellent read.”
But the book must have been removed accidentally. Don’t leave me hangin’!
What is the book recommendation for python?
very helpful 🙂
very helpful 🙂