Sie sind auf Seite 1von 154

How should I start learning Python?

Answer Request Follow 7.8k Comments 3 Downvote

Promoted by Udacity.com

Explore Udacity online courses.


Master in-demand skills, design amazing projects, and boost your hireability today!

learn more at udacity.com

Answer Wiki

List of resources - Please append your entries. No Affiliate links / SPAM please.

DataCamp Intro to Python for Data Science - Intro to Python for Data Science
The Complete Python Masterclass: Learn Python From Scratch
Learn Python - Best Python Tutorials
Learn Python for Data Science - Dataquest
Collection of 53 Free Python books - Python Programming Books [ click free. ] . Includes all
the books mentioned below.
Python: Learn Python in One Day and Learn It Well
Codecademy: Python
Python Step by Step: Build a Data Analysis Program (Disclosure: Added by author)
Learning Python, 5th Edition
Learn Python The Hardway (http://learnpythonthehardway.org/ )
Python: The Essential Reference (http://www.informit.com/store/pr... )
How to Think like a Computer Scientist (http://greenteapress.com/thinkpy... )
Learning Python - 4th Edition (http://www.rmi.net/~lutz/about-l... )
Byte of Python (http://www.swaroopch.org/notes/P... )
Beginning Python (http://www.apress.com/9781590599822 )
The Python Standard Library by example (The Python Standard Library By Example )
Python in a nutshell (http://shop.oreilly.com/product/... )
Head First Python
Core Python Programming (http://corepython.com/ )
MIT's introductory course (Introduction to Computer Science and Programming )
Google for Education Python course: Google's Python Class
Automate the Boring Stuff with Python: Practical Programming for Total Beginners
Data Science from Scratch: First Principles with Python
Learning to Program Using Python, 2nd Edition
JavaTpoint is the best resources to learn Online Python Tutorial for beginners .
http://www.learnbay.in - Online Instructor led Training in Python Basics/Advance
100+ Answers

Saurav Sharma, Full Stack Python Developer (2009-present)


Answered Aug 14, 2017

Warning: This is going to be a long answer.

I have been programming in Python since 8 years now and in this answer I will try to share my
experience.

Edit: TLDR:

1. Learn Python Basics from : Welcome to Python.org

2. Best resource to learn as per me: The Complete Python Masterclass: Learn Python From
Scratch .

Here are the course content along with the section durations:

1. Final step: Build projects on your own. More than 100+ project ideas are listed below in
the answer.

The most common mistake a newbie programmer makes is to start learning some programming
language without any specific purpose or goal in mind.

Before you start learning Python or any programming language for that matter, you should have a
certain goal in mind. You should question yourself “Why exactly do I want to learn
Python?” For example you might want to be a data scientist or you just want to design web apps
or build APIs.

Once you have decided your main goal learning becomes much easier, efficient and faster. Now lets
get to the actual answer:

Python basics: If you are completely new to python then its important to know the basic syntax.
Here are a few basic concepts which you should be aware of:

1. Variables, Strings and accepting user input.

2. Control structure in python such as if-else statement.

3. Loops: For and while loops.

4. Functions and modules, built-in functions like Range.


5. Exception handling .

6. File handling.

Important topics:

Once the basics are taken care of, you can move to other important topics which are listed below.
Note that these topics are the most widely used and special attention should be paid to these:

1. Object oriented programming. (Useful while using Python Framework like Django).

2. List, Tuples & Dictionaries. (Useful in data analysis).

3. List comprehension.

4. Map and filter.

5. Lambda functions.

6. Regular expressions (One of the superpowers of Python and widely used in Django).

Now once you are done with above basics, lets proceed to some interesting python frameworks and
libraries.

For building GUI apps:

1. Tkinter.

2. PyQt.

Build dynamic web based application:

1. Django( One of my favourites)

2. Flask.

Data analysis:

1. Pandas.

2. Numpy.

Web crawling:

1. Beautiful soup.

2. Scrapy.
Which learning resources do I recommend?

Honestly, I would prefer a learning resource which suits your style. For me I would prefer learning
via official Python documentation for Python basics.

Here is a link to the docs:

Welcome to Python.org

If you want a one-stop solution to all of your Python needs then I would recommend this
course: The Complete Python Masterclass: Learn Python From Scratch . I have listed this course
because it delivers what is promised. It covers Python basics, Object oriented programming,
Tkinter, Flask, Web-scraping, Data analysis using Numpy and Pandas and also has some projects
to build some cool applications.

Next steps:

Once you have completed the above topics to a level that you are comfortable to work with, then
you can start building your own projects.

One interesting thing about Python is that there is a lot you can do with Python.

Note:

Here are a few project ideas listed below which you can try, I will try to keep the list updated:

Numbers

Find PI to the Nth Digit - Enter a number and have the program generate PI up to that many
decimal places. Keep a limit to how far the program will go.

Find e to the Nth Digit - Just like the previous problem, but with e instead of PI. Enter a number
and have the program generate e up to that many decimal places. Keep a limit to how far the
program will go.

Fibonacci Sequence - Enter a number and have the program generate the Fibonacci sequence to
that number or to the Nth number.

Prime Factorization - Have the user enter a number and find all Prime Factors (if there are any)
and display them.

Next Prime Number - Have the program find prime numbers until the user chooses to stop
asking for the next one....(more)
Upvote 103 Downvote

Umang Ahuja
This is the most complete answer I have ever read....

Promoted by DigitalOcean
Deploy your Python project - free $100/60-day credit.
Rapidly provision thousands of cloud servers in seconds with firewalls, monitoring
and alerts included.

learn more at try.digitalocean.com

Suraj Patil, Author of https://leanpub.com/antitextbookpy


Updated Mar 20, 2017

EDIT: I have started a tutorial on github, thewhitetulip/build-app-with-python-antitextbook , it


explains the usage of Python by using examples.
----

that depends

Python for Programmers


The tutorials on this page are aimed at people who have previous experience with other
programming languages (C, Perl, Lisp, Visual Basic, etc.). Also of potential interest are such related
Beginners Guides as BeginnersGuide/Overview and BeginnersGuide/NonProgrammers , and
the tips in MovingToPythonFromOtherLanguages .
Books, Websites, Tutorials (non-interactive)

After Hours Programming's Python Introduction A beginners introduction into Python.

Basic to Advanced Tutorial A good tutorial on Python especially for the beginners.

Free python tips and tutorials Python tips and tutorials for beginners and professional
programmers.

Get started Arabic Tutorials Useful tools , tutorials and code samples. Python 101
introduces the basic data types, and 201 covers particular tasks such as parsing text and
writing unit tests.

Google's Python Class - Google's Python tutorial for "people with a little bit of
programming experience"

Interactive tutorial on Python A tutorial for beginners with interactive examples.


Intro to Python - A Brief Presentation about Python mainly aimed at experienced
programmers. Might be nice as a first pass over the language.

Instant Python A minimal crash course by Magnus Lie Hetland.

Lark's Tongue Guide to Python - This guide uses simple games to teach Python.

Learn Python in 10 minutes

Python 2 & 3 Quick-Guides A fast and efficient guide, with many examples, for quickly
learning many tricks of Python.

Python 101 - Beginning Python and Python 201 - (Slightly) Advanced Python Two
self-training courses from Dave Kuhlman.

Python Course - This online Python course is aiming at beginners and with advanced
topics at experienced programmers as well.

Python for Programmers - for "Professional programmers who need to learn Python "

Python for Science Course material written by Konrad Hinsen for an introduction to
Python aimed at biologists.

Python Koans Learn Python through TDD

Python Programming for Beginners A short introduction to writing command-line


applications in Python by Jacek Artymiak.

Python Essential Reference (book) If you want a highly compressed K&R-style 'just the
facts' overview, David Beazley's "Python Essential Reference" covers practically all of the
language in about a hundred pages.

Python one touch Arabic tutorials .

Python Short Course A set of course slides by Richard P. Muller of Caltech that are
aimed at scientific users. For example, the first example is a script to process output from
a quantum chemistry simulation.

A basic Python Tutorial that goes into some interesting features and examples.

Python Tutorial This tutorial is part of Python's documentation set and is updated with
each new release.

ComparingTypes Quick look at some common programming types for python and other
languages

Software Carpentry : lectures aimed at scientists and engineers.


Wikibook:Python Programming

Wikiversity:Python The Wiki(anything) information about Python.

You can find a variety of Python tutorials on Code Teacher .

Interactive Tools and Lessons

Computer Science Circles

LearnStreet: Free online Python tutorials and practice exercises

How to Think Like a Computer Scientist, Interactive Edition

Interactive tutorials for scientific programming using Python

Problem Solving with Algorithms and Data Structures using Python (second-level
course)

Python visualizer tool

Python Video Tutorials

Einführung in die Programmierung mit Python (14 videos - German)

'Getting started with Python' blog series at ShowMeDo , includes articles on 'Python
Development Environments' and 'Python Under-The-Hood'

Google's Python class

MIT's 6.00 Introduction to Computer Science and Programming (in Python)

The Khan Academy computer science playlist teaches Python.

A Guide to Python Resources on the Web ...

(more)

Upvote 83 Downvote

Recommended All

Promoted by Stelle
Looking for great jazz shoes?
Check out our deal now.

learn more at amazon.com


Vik Paruchuri, Founder, Dataquest
Answered Jul 7, 2015

The most important question to answer first is why do I want to learn python?Answering this
will guide what you use to learn and how you learn.

Starting with a very generic list of resources to learn python when you eventually want to make
websites (for example), will not only reduce your motivation, it will also make it much harder to
apply the knowledge you gain. I've tried to learn coding without context and application, and I've
almost never come out of it with any meaningful skills.

When I learned python 3 years ago, I wanted to create websites. It shouldn't come as a shock to
anyone that the best way to learn how to do this was to create websites.

1. Find what motivates you

Finding and keeping your motivation is key -- I slept through a lot of the one high school
programming class I took because it made us memorize a bunch of syntax. On the other hand,
when I needed to learn python to make an automated essay scoring algorithm, I stayed up many
late nights learning and iterating.

Motivation is rarely addressed in learning -- you're often just given a list of generic tutorials to try,
and told to go do them. But the great thing about python is that you can develop almost anything,
from mobile apps to games to advanced machine learning algorithms. No matter what you're
interested in, you can probably build it in python, and there's probably a good getting started
tutorial.

Pick an area or two that you're interested in, and stick with them-- you'll be developing quite a few
projects in the areas.

Here are some sample areas, but feel free to add your own:
Websites

Mobile apps

Games

Data science/Machine learning


2. Learn some basic python syntax

Unless you know the basic syntax, it's hard to implement anything. That said, don't spend too long
on this. The goal is to learn the very basics, so you know enough to start working on your own
projects in your areas(s) of interest.

For reference, I spent less than a week on codecademy, and went through about 30% of the
material. This was enough to get started on a project.

Some resources that can help you:

Codecademy -- does a good job of teaching basic syntax.

Learn python the hard way -- a book that teaches a lot of python concepts.

Dataquest.io -- this is my startup. It's focused on teaching python for data science, but
it teaches all the basic syntax also.

The Python Tutorial -- the tutorial on the main python site.

I can't emphasize enough that you should only spend the minimum amount of upfront time
possible on basic syntax. The quicker you can get to working on projects, the faster you will learn.
You can always refer back to the syntax when you get stuck later.

3. Make structured projects in your chosen area

Unless you actually apply your knowledge, you won't be able to retain it well. Projects are a great
way to learn because they push your capabilities, show you how to apply skills, and give you a
portfolio to show employers in the future.

When you start out, it can be helpful to have more structured projects with some guidance. Here
are a few ideas:

Games
Codecademy -- walks you through making a couple of simple games.

Pygame tutorials -- pygame (the python library for making games) has a good list of
tutorials
Making games with pygame -- this book looks like a great way to learn python by
making games

Websites
Flask tutorial -- the official flask (simple python web framework) tutorial.

Bottle tutorial -- Bottle (even simpler web framework for python) tutorial.

How To Tango With Django 1.7 -- a guide to using django (more complex python web
framework)

Mobile apps
Kivy guide -- Kivy is the tool that lets you make mobile apps with python. They have a
guide on how to get started.

Data science
Dataquest.io -- Teaches you python and data science interactively. You analyze a series
of interesting datasets ranging from CIA documents to NBA player stats.

S...
(more)

Upvote 1.7k Downvote

Recommended All

Akash Dugam, I've used python, I know about it.


Updated Fri

How do you learn languages? By learning alphabets then syntax and later you apply grammar on
it.That's pretty much same with Python as well.

People are requesting me to write a brief article on python. I think this is the write time for me to
write, "Complete Guide on Python"...

To understand python's market then please follow this link: Akash Dugam's answer to Between
Java and Python, which one is better to learn first and why?

I believe in this quote,'In order to learn something, first you need to start it' .. Here I have created
article which will provide you everything you will need to get started with python.

This learning module is divided into following parts:


1. Learn From Books,

2. Learn from Tutorials,

3. Learn from MOOC's,

4. Learn from Paid courses,

5. Learn from Youtube.

6. Learn From Applications.

First things first, go through these programming community curated resources - Learn Python -
Best Python Tutorials | Hackr.io

Let's start with books now.

1. Learn From Books:

Many said, books are the greatest friends of human. Yes! that's true. Even I have learn lot of things
from books by doing self study. Books are also known as a treasure of knowledge. There are lot of
books (thousands of) books has written on python. So, there will be hell of confusion on which one
has to follow. I've done some research and study and comes up with following lists:

A] Head First Python: Well, your mind remember more diagrams or picture than text. It has
been proven by scientist. So, what if I tell you, these researches practically used by Head first team,
then? ... I wondered once, how can someone things to convert that into books. You will find how
theory has been explained by diagrams. Isn't that great? (Here is the official
link:http://shop.oreilly.com/product/... )

If you're beginner to python then I'd suggest to go and get this book.

You can buy this book here: Head First Python

Indian user,Please follow this link: Postpaid, DTH & Datacard Bill Payments at Paytm.com

B] Python Cookbook: Once you know ingredients, It's your time to cook. Some people got a
habits to learn everything from cookbook for them we have python cookbook available. (Here is the
official link: Python Cookbook )

You can buy this here: Python Cookbook

Indian users,please follow this link: Buy Python Cookbook Book Online at Low Prices in India
These two books are really great to kick-start with python.

2. Learn from Tutorials:

Don't want to learn it from books? Got a good internet connectivity? If yes, then here are the best
tutorials sites on internet.

A] Codeacademy: They have started teaching programming language in the banner of 'Learn
with doing it'..Yeah that's true. They made it very interactively and the content presentation is in
very lucid way.

Here is the link to get start with: Python

B] Python Course: Once roaming into internet I've found this comprehensive website that
content immense knowledge about python. Why don't you guys check this out: Online and On Site

There are many tutorials about python that can found on google. But these are two very famous
and most important thing is their BEST content.

3. Learn From MOOC's:

It's became trends to learn all things from virtual teacher. Edx, Coursera, Udacity are big players in
the world of MOOC's. What I like about MOOC is, as they have prepared by big shot universities
like Stanford, MIT etc.

Here are the list of MOOC's to follow on Coursera:

A]Programming for Everybody (Getting Started with Python) By University of


Michigan: https://www.coursera.org/learn/p...

B]An Introduction to Interactive Programming in Python (Part 1) By Rice


University: https://www.coursera.org/learn/i...

C]An Introduction to Interactive Programming in Python (Part 2) By Rice


University: https://www.coursera.org/learn/i...

Here is the list of MOOC to follow on EDX:

A] Learn to Program Using Python By Texas University: Learn to Program Using Python

Here is the lis...(more)

Upvote 159 Downvote


Recommended All

Goutham Harsha, "Confidence is a stain they can't wipe off !"


Answered Jul 28, 2014

Originally Answered: Give Suggestions for learning Python Programming Language for beginner as per your
experiences? Which Book to refer? Tips?

Thanks for the A2A.

If you are a beginner to programming, follow the following path (source: python - Best ways to
teach a beginner ):

1) FizzBuzz: Start with command line programs. You can write some fun games, or tools, very
quickly, and you learn all of the language features very quickly without having to learn the GUI
tools first. These early apps should be simple enough that you won't need to use any real debugging
tools to make them work.

If nothing else things like FizzBuzz are good projects. Your first few apps should not have to deal
with DBs, file system, configuration, etc. These are concepts which just confuse most people, and
when you're just learning the syntax and basic framework features you really don't need more
complexity.

Some projects:
Hello World!

Take the year of birth and calculate age (just (now - then) no month corrections). (simple
math, input, output)

Ask for a direction(Up, down, left, right), then tell the user their fate (fall in a hole, find a
cake, ect). (Boolean logic)

FizzBuzz, but count once every second. (Loops, timers, and more logic)

Some really like an app which calls the users a random insult at some interval. (Loops,
arrays, timers, and random if you make the interval random)

2) Simple Project: Once you have a good grasp of language features, you can start a project
(simple, fun games). Choose something that can be done in 6-12 hours. Don't spend time to
architect it early. Forget about design here. If it falls apart, find out what happened and why it
failed.

This is where you start knowing the debugging capabilities of your tools. Even if you can see the
problem by reading the code you should learn how to use the tools.

If, the project gets functional you can use learn refactoring tools. Its good if you can then expand
the project with some simple features which you never planned for. This usually means refactoring
and significant debugging, since very few people write even half decent code their first time.

Some projects:
Hangman game

Experimenting with robotics(Vex and Mindstorms are options)

3) Real Project: Start a real project which may take some time. Use proper source control, and
make a point to have a schedule. Run this project like a real project, if nothing else its good
experience having to deal with the tools.

The most important thing I've is to make even the first simple apps apply to what you are
interested in.

Some projects:
Tetris

Text file based blog engine

More advanced robotics work

Online Resources:
A Gentle Introduction to Programming Using Python
Page on alice.org
Scratch - Imagine, Program, Share
How to Design Programs
Structure and Interpretation of Computer Programs
Learn to Program, by Chris Pine
Dive Into Python
Python Programming
Project Euler - Mathematical problems, mostly
News
Page on inventwithpython.com
Squeak by Example

Books (in the order):


A Byte of Python
Learn Python
The Python Tutorial
How to Think Like a Computer Scientist
Core Python Programming (2nd Edition): Wesley Chun: 9780132269933: Amazon.com: Books

44.8k Views · View Upvoters · Answer requested by Binod Syangtan

Upvote 122 Downvote

Recommended All

Arihant Bansal, Stuck with Python 2.7


Answered Jul 28, 2016

This post is broken up into sections on ways to learn Python, about Python and good ways to start
practicing Python.

About Python

Python is an interpreted, object-oriented, high-level programming language with dynamic


semantics. Its high-level built in data structures, combined with dynamic typing and dynamic
binding, make it very attractive for Rapid Application Development, as well as for use as a scripting
or glue language to connect existing components together. Python's simple, easy to learn syntax
emphasizes readability and therefore reduces the cost of program maintenance. Python supports
modules and packages, which encourages program modularity and code reuse. The Python
interpreter and the extensive standard library are available in source or binary form without charge
for all major platforms, and can be freely distributed.

Often, programmers fall in love with Python because of the increased productivity it provides.
Since there is no compilation step, the edit-test-debug cycle is incredibly fast. Debugging Python
programs is easy: a bug or bad input will never cause a segmentation fault. Instead, when the
interpreter discovers an error, it raises an exception. When the program doesn't catch the
exception, the interpreter prints a stack trace. A source level debugger allows inspection of local
and global variables, evaluation of arbitrary expressions, setting breakpoints, stepping through the
code a line at a time, and so on. The debugger is written in Python itself, testifying to Python's
introspective power. On the other hand, often the quickest way to debug a program is to add a few
print statements to the source: the fast edit-test-debug cycle makes this simple approach very
effective.

Ways to learn Python

Learn by Reading

1. Learn Python the Hard Way (LPTHW)

Don’t be scared by the title – Learn Python the Hard Way (LPTHW) is probably the most popular
online tutorial for learning Python. In fact, many “Pythonistas” at Esri started learning Python with
this website! This exercise-oriented guide reinforces its teachings through repetition and practical
usage of basic Python functionality, even if you have no prior experience. I recommend completing
the first 32 exercises to equip yourself with the knowledge you need.

2. Think Python: How to Think Like a Computer Scientist

I recommend this site for those users who are used to a more “textbook” approach to learning. The
book is produced by O’Reilly and is now free to the public. The approach is different than LPTHW,
and some people may find it to be less fun to learn from, but it’s packed with useful information.
The chapters up to, and including, “Files”, will be the most useful for ArcPy users, but reading
subsequent chapters will help you understand a little bit about what’s going on “under the hood” in
a Python module such as ArcPy.

Learn by Watching

3. The New Boston

The videos in this series are perfect for their format. They are concise (each video runs about five
minutes), thorough, and show practical coding examples that you can follow along with or practice
on your own. In the first 31 videos, this series covers just about all of the concepts you will need for
getting started.

4. Khan Academy

Khan Academy has made free education available to everyone for a variety of topics, and their
Python course was one of the first “classes” offered. The curriculum is similar to what you can
expect from a Computer Science class, so it may seem a little challenging at first. However, if you
stick with it, you’ll be thinking like a programmer.
Learn by Doing

5. Code Academy

This is an interactive Python course that teaches the basic concepts of Python by having you
complete coding exercises. All the work is done online –you don’t even need Python installed on
your computer to complete it! The site prompts you to complete small lessons and challenges, and
is great for those users who don’t always have a consistent amount of time to contribute to
studying. I would recommend completing the first 15 lessons if you want to understand more about
Python.

Practicing and getting started with Python programming

I've had to work with several beginner (never wrote a line of code) programmers, and I'll be doing
an after school workshop with high school students this fall. This is the closest thing I've got to
documentation. It's still a work in progress, but I hope it helps.

1) FizzBuzz. Start with command line programs. You can write some fun games, or tools, very
quickly, and you learn all of the language features very quickly without having to learn the GUI
tools first. These early apps should be simple enough that you won't need to use any real debugging
tools to make them work.

If nothing else things like FizzBuzz are good projects. Your first few apps should not have to deal
with DBs, file system, configuration, ect. These are concepts which just confuse most people, and
when you're just learning the syntax and basic framework features you really don't need more
complexity.

Some projects:

Hello World!

Take the year of my birth, and calculate my age (just (now - then) no month
corrections). (simple math, input, output)

Ask for a direction(Up, down, left, right), then tell the user their fate (fall in a hole, find a
cake, ect).(Boolean logic)

FizzBuzz, but count once every second. (Loops, timers, and more logic)

Depending on their age some really like an app which calls the users a random insult at
some interval. (Loops, arrays, timers, and random if you make the interval random)
2) Simple Project Once they have a good grasp of language features, you can start a
project(simple, fun games work good.). You should try to have the first project be able to be
completed within 6-12 hours. Don't spend time to architect it early. Let them design it even if it
sucks. If it falls apart, talk about what happened and why it failed, then pick another topic and start
again.

This is where you start introducing the debugging capabilities of your tools. Even if you can see the
problem by reading the code you should teach them how to use the tools, and then show them how
you could see it. That serves the dual purpose of teaching the debugging tools and teaching how to
ID errors without tools.

Once, or if, the project gets functional you can use it to introduce refactoring tools. Its good if you
can then expand the project with some simple features which you never planned for. This usually
means refactoring and significant debugging, since very few people write even half decent code
their first time.

Some projects:

Hangman game

Experimenting with robotics(Vex and Mindstorms are options)

3) Real Project Start a real project which may take some time. Use proper source control, and
make a point to have a schedule. Run this project like a real project, if nothing else its good
experience having to deal with the tools.

Obviously you need to adjust this for each person. The most important thing I've found is to make
even the first simple apps apply to what the person is interested in.

Some projects:

Tetris

Text file based blog engine

More advanced robotics work

3.2k Views · View Upvoters · Answer requested by Vignesh Srinivasan, Aakanksha Jain, and 1 more

Upvote 31 Downvote

Recommended All

Steve Barnes, 10 years plus developing in and training others in python.


Answered Sep 17

In summary you can start learning python quickly and easily download it and start using it.
However, you will probably never learn all that there is to know about python.

As other answers have pointed out there are a myriad of books, videos & tutorials available, many
of them excellent and many free but the only way to truly learn anything is by doing it, a lot and in
as many ways as possible.

One of the best resources for learning python is python itself - the error messages are a lot clearer
than many other other programming languages and there are two easy to remember commands
that can be invaluable: dir() and help() - the first gives you a list of the objects currently
available in the current or specified context and the second by itself puts you into the help mode or
with an object as a parameter gives you the help on that object.

> python
Running Debug|Win32 interpreter...
Python 3.7.0a0 (heads/master:dadca48, Aug 11 2017, 18:45:11) [MSC v.1900 32 bit (Intel)] on w
Type "help", "copyright", "credits" or "license" for more information.
>>> dir()
['__annotations__', '__builtins__', '__doc__', '__loader__', '__name__', '__package__', '__sp
>>> import os
>>> dir(os)
['DirEntry', 'F_OK', 'MutableMapping', 'O_APPEND', 'O_BINARY', 'O_CREAT', 'O_EXCL', 'O_NOINHE
>>> help(os.excel)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'os' has no attribute 'excel'
>>> help(os.execl)
Help on function execl in module os:

execl(file, *args)
execl(file, *args)

Execute the executable file with argument list args, replacing the
current process.

>>> help(os.exec)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'os' has no attribute 'exec'
>>> i = 3 # i is an integer
>>> dir(i) # Methods and options for i
['__abs__', '__add__', '__and__', '__bool__', '__ceil__', '__class__', '__delattr__', '__dir_

(more)
Upvote 13 Downvote

Recommended All

Anthony Lee, former Test/Technical Project Manager at Quanta Computer


(2014-2017)
Answered Sep 18
Originally Answered: How can I learn Python easily and fast?

I used to program in low-level programming languages, such as C, and did not believe scripting
could be as powerful.

I was introduced in Python scripting which had significantly reduced my workload on my previous
job through tasks automation. I was surprised on how reliable and useful Python, a high-level
programming language, is in many fields of my work, including but not limited to: data
preprocessing, I/O, serial communication, data science, data mining, web scraping, etc.

One of the reasons Python is so powerful is because of the availability of the libraries, and they are
for FREE! It has MATLAB popular plotting library matplotlib.

My Python learning process takes a medium-steeped in the first month since I have 5+ years of
programming experiences in other programming language. It may vary on your case, but here are
some tips:

1. Sense of Purpose / Goal


I am a casual programmer but my coworkers said I can really program. What I always
suggested my coworkers in learning a programming language is: Chicken First or Egg
First.

TLDR; Before you set your foot out of your house, you need to know where you are
heading.

A lot of my co-workers bought Python textbook and started to learn by reading it from the
book cover only to find out they stopped at page 10. Why? Because they did not have a
sense of purpose in reading those books. What are the purpose to learn Python or even
other programming language? This is actually happened to me before as well. I learn this
because I was made aware of its capability in solving my problem.

I would say that you should identify a problem that is repetitive, is digital, needs or needs
no calculation, and it takes a lot of your time to solve it so you have enough motivation to
learn and solve this problem through programming.

In my experience: I have to summarize the data of 2 remote factory plants, each plant
has hundreds of different logs producing sensors. It took 3~4 hours of my everyday labor
time just to summarize this, Monday to Saturday (!!) since I worked in China. I spent
1~2 hours after my work time, not exceeding 6 hours of programming hours, to build a
python script to automate this tasks, resulting in less than 10 minutes of work. It saves me
at least 170 minutes everyday!

2. Discuss with your friends/coworkers


I learned all the tips & tricks and libraries from my counterparts. Discussing this my
friends/coworkers who are also intrigued to learn Python acted as my biggest catalyst in
learning this Python.

Some of the libraries you can start with: matplotlib, numpy, scipy, seaborn
If you are interested in data science: pandas, scikit-learn, keras, tensorflow
Useful tools: jupyter notebook

3. Achievements
Ask your friends what they have achieved through programming in Python and what
libraries they implemented to achieve it.

4. Getting more and more popular


Python is getting more and more popular in the fields of machine learning and data
science. (Source: Python vs R - Who Is Really Ahead in Data Science, Machine
Learning? )
Which we can infer that more and more Python libraries are maturing, ready to use, more
available tutorials, more users to discuss with (

5. Online Resources
Learning from online resources could not get better in this era. One of the online
resources I used extensively is: Google and Stack Overflow . Google directs you to
tutorials, implementations, and discussions. Stack Overflow provides expert tips. Your
Home for Data Science also very resourceful if you are learning Data Science.

In short: identify your problem, do your research/ask your friend (you can ask me! :D ), start doing
it.

11.5k Views · View Upvoters

Upvote 55 Downvote
Recommended All

Robert Cezar Matei, product manager at Quora


Answered May 8, 2010

Originally Answered: What are the best resources to start learning Python?

As a complement to the other answers for those of you who are trying to "learn to program", rather
than just switch into Python from another language: you should jump from "learning
language features" material to a "build something" tutorial as soon as possible.

This probably means doing a web app, since the web is the future. So as soon as you understand
functions, conditionals and maybe classes, move on to my answer to this question:
How do I get started with web programming (given a bit of programming exposure)?

If you try to read all the way through a Python book, you're bound to get lost in increasingly
advanced language features that will lack real-world context and are unnecessary for building a
simple thing. That's not to say that those aren't worth learning later on, but for your progress and
motivation it'll be more rewarding to make progress on something.

60.4k Views · View Upvoters

Upvote 69 Downvote

Ned Rockson
An interesting and challenging way to start with Python is answer Project Euler questions in it. ...

Mazahir B Haroon, Software Engineer (2017-present)


Answered Dec 11, 2016

Originally Answered: I am a mechanical engineer with no knowledge of programming. What is the best way to learn
Python?

First it would be good to try out some examples at Python , to get an idea of python
programming, mainly its syntax. Then,
[Codecademy : Python
To learn the syntax of the language, this site might help.]

Then Download and install Python from : Download Python

Text Editors I would recommend :


Atom : A hackable text editor for the 21st Century
Sublime : Sublime Text - Download
As you said you are a newbie to programming, what I would like to say is, (according to me) The
best way to continue learning after getting a little idea’ about python programming and its syntax,
is to do it in a ‘Goal Oriented’ manner. That is, try to find an idea and try setting up an algorithm
for the same.
That is, just like any other project, first you need to have :

An idea of what you are planning to achieve, then

How you want to achieve it (Not the Coding, but an Algorithm)

and then start to code.

Idea :

A good way to find an idea would be to look into your life and find out what are those small things
you do daily that has a scope for automating.Or an easy task that you have to do repeatedly. I’m
sure there is a python script you can write to solve it.

Algorithm :

Algorithm could be in simple words. Like, ‘Computer, first do this, then do that’. One way to write
an algorithm is to imagine that you have a magic wand , using which you can make your computer
do anything, BUT given a condition that you will have to direct it through each step! .
(Hope this works for you, as it did for me!)

Coding:

Now after you have setup an algorithm and is ready to start writing code. Google Search each part
of your algorithm. For eg: if one step in your algorithm is :
Computer, Open this website.
Google Search, Python script to open a website. And open any link u think is good. (Best Open the
one from Stack Overflow )
[link to answer for the above google search in Stack Overflow : how to open a url in python ]
Try it out, if it works, Cool. Or if it shows an error , Google Search the Error. And hopefully
again Stack Overflow would come to your rescue.

And as it works slowly integrate it to your main program. And again, if it worked when you tested it
individually but not with your main program, search that error too.

Tip : When you are to overwrite your last perfectly working script with the new integration, make
sure you do it in a copy of it. And when you find the script is working fine with the new integration ,
make it your new main file. (Or if you forgot this, Don;t Worry! Unlike Life, in programming you
(almost) always have an option to ‘undo’ your mistake.

Hope this was helpful.


PS : This is just my opinion :) Happy Coding!

4.9k Views · View Upvoters

Upvote 17 Downvote

Recommended All

Suzan Cruz, Computer Science Student


Answered Nov 13, 2016

The Complete Python Masterclass: Learn Python From Scratch

This is one of the most comprehensive Python course which I found to be useful.

It covers almost everything about Python including Django, Flask, Tkinter & Web Scraping.

The best part was that this course starts from absolute basics and then the difficulty increases
gradually.

The course is about 14 hours long with 129 lectures.

Here are the contents of the course:

Lecture 1 Introduction To The Course


Lecture 2 Installing Python And PyCharm

Lecture 3 Hello World Program In Python

Lecture 4 Some other mathematical operations in Python

Lecture 5 Strings In Python

Lecture 6 Accepting input from the user in Python

Lecture 7 Performing operations on a string in Python

Lecture 8 Variables in Python

Lecture 9 In place operators in Python.

Lecture 10 Writing our very first program in PyCharm

Lecture 11 Coding Challenge Part 1

Lecture 12 If statement in Python

Lecture 13 Elif statement in Python

Lecture 14 Introduction to lists in Python

Lecture 15 List operations in Python

Lecture 16 List functions in Python

Lecture 17 Range function in Python

Lecture 18 Code reuse and functions in Python

Lecture 19 For Loop in Python

Lecture 20 Boolean logic in Python

Lecture 21 While loop in Python

Lecture 22 Passing arguments to functions in Python

Lecture 23 Making function return value in Python

Lecture 24 Passing functions as arguments in Python

Lecture 25 Modules in Python


Lecture 26 Errors & exceptions in Python

Lecture 27 Exception handling in Python

Lecture 28 Finally block

Lecture 29 File handling

Lecture 30 Adding data to the file

Lecture 31 Reading from a file

Lecture 32 Appending to a file

Lecture 33 Dictionaries

Lecture 34 Tuples

Lecture 35 List Slicing

Lecture 36 List Comprehension

Lecture 37 String formatting

Lecture 38 String functions

Lecture 39 Numeric functions

Lecture 40 Functional programming

Lecture 41 Lambdas in Python

Lecture 42 Map in Python

Lecture 43 Filters in Python

Lecture 44 Generators in Python

Lecture 45 Object Oriented Programming in Python

Lecture 46 Inheritance in Python

Lecture 47 Recursion in Python

Lecture 48 Sets

Lecture 49 Itertools
Lecture 50 Operator overloading in Python

Lecture 51 Data hiding in Python

Lecture 52 Regular expressions in Python...(more)

Upvote 21 Downvote

Recommended All

Aviral Sharma, I write stuff on the black window


Answered Aug 19, 2017

Python is easy, much easier than you think it is.

I am assuming you are novice to programming languages. If you aren’t, and have a basic idea of
other languages like C or Java, you’re hardly going to face any problem understanding the syntax,
and it would be a matter of a day or two to get yourself familiar with it’s environment. But if you are
a new coder, you can continue reading my answer.

The easiest, and also the most inefficient way to learn python would be to pick up a book and spend
hours reading the syntax. You’re probably not going to retain even 50% of what you have been
reading for hours.

Instead, the better way would be to download Python (preferably version 2.7), open the command
line, and start right away. Chances are that you’re going to get an error in the very first line. Now
that you’ve been greeted with an error, you’re officially a coder.

Get started with some basic stuff. For example, try this-

>>> a=5
>>> print a
5

That’s it! You’ve created a code. Once you are familiar with the syntax, you can try doing different
stuffs:

>>> a=9
>>> b=7
>>> print a+b
16
>>> print "The sum is ", a+b
The sum is 16
Easy isn’t it? Ofcourse you aren’t building the Quora API with print a+boperation, but then, it’s
just the start. Experiment with it, read the python manuals and try using different functions,
commands or styles of writing the code, even if they don’t make sense at all; like the one you see
below:

>>> def magic():

... name=raw_input("Enter your name: ")


... print "Ahh! I already knew you are", name, ". It's magic you see."
...
>>> magic()
Enter your name: Rubeus Hagrid
Ahh! I already knew you are Rubeus Hagrid. It's magic you see.

While you begin with python, you will also need some reference materials, books and resources to
get help and test your skills. Here I list a few of them:

Python comes with it’s very own Python Manuals , which are present in the python
folder of your computer. Their tutorials are the one of the best resources at present to
learn python’s syntax and codes.

Mak Lutz’s Learning Python is another fantastic book for new programmers.

There are plenty of online courses available, like this one on edX: Introduction to Python:
Fundamentals by Microsoft. All these courses are good, but switch to the online courses
only after you’ve spent atleast a week familiarizing with the python interface.

Once you’ve spend sometime writing codes on python, you can start coding on online
platforms like HackerRank . Don’t wait too long thinking it isn’t time for you to begin
competitive coding, just head to the site, open an account, and start right away. Most of
your learning will begin when you actually start solving problems through codes.

Once done with basics, you can start learning about libraries, classes and tons of other
stuff, all from either the python manuals, or any of the suggested python books.

If you’re facing any problems with your code, do not hesitate in asking your query
on Stackoverflow . You’re most likely to solve your toughest, dumbest or out-of-the-
world challenges here.

The best thing about python is it’s instant compilation. The command line interface compiles your
code as soon as you press enter, saving the precious time of the coder. Unlike C, you don’t have to
include header files, write long codes, save and compile every time even for a small program that
prints “Hello World”. You can easily test your cases, get errors instantly, write again, succeed with
it, and move ahead with further programming all in the same window, all in a matter of few
seconds. But if you want to save your code for future purpose, you can always use python’s IDLE,
which works exactly like any other C compiler.

It wouldn’t take long for you to realize the fact how easy it is to code in python. And once you’re
into python, it is highly unlikely that you would shift to another language.

Happy coding:)

1.4k Views · View Upvoters

Upvote 16 Downvote

Recommended All

Ajit Kumar, Ph.d Student at Pondicherry University (2012-present)


Answered Jan 26
Originally Answered: How can I learn Python from the beginning?

Learning Python is easy but same time there is chance of missing the proper learning track. So, to
learn Python programming or Programming with Python, you must follow a proper tutorial or
book. But, Instead of finishing either of these learning resources follow below cycle. (My personnel
opinion)

1. Learn the basic constructs of Python programming (syntax, operator, conditional and
looping statement, list, dictonary).

2. Select and learn few important basis Python system modules (os,sys,math etc.).

3. Select and learn few important external library (urllib, beautifulsoup, etc.)

4. By, going through the 1–3 steps will give you basic understanding of Python language.
Now, the tough part is not loosing the interest or missing the learning track. So, as fourth
step, give some time and think about small to big projects you want to build ever. ( Please
don’t think, is that possible or not). Make list of such projects, now start search Python
modules and tutorials related to your project one by one. This will open up a new way of
learning and you will have tangible outcome to show.

5. Once, we have done with 1–4, please repeat. Yes, repeating this will help you to
consolidate your learning and help you to push further. Ofcourse, try to improve your
project further.
6. Now, decide the domain you want to work on. for example, Web development, data
science, cyber security etc. According to your selected domain there are pack of Python
modules that you have to learn. For example:

Web development: Flask/Django/bottle etc.

Data science: numpy/pandas/scikit-learn/matplotlib etc.

Image processing: PIL/scikit-image etct.

And, as you know, learning never ends, so you will have to keep learning. After doing all these
steps, you will become smart enough to take further path of Python learning.

Note: It is best to start with Anaconda Python installation to keep initial installation issues away.
Anaconda is a Python distribution which comes with lots of important Python modules.

I am open for any further questions, on this topic.

All the best.

1k Views · View Upvoters

Upvote 19 Downvote

Recommended All

Nathan Hemingway, Professional Python programmer


Answered Dec 2, 2015

Originally Answered: How do I learn Python faster?

I feel like it's the same with any language:

1. Learn the syntax.

2. Increasingly complex "Hello Worlds"

3. Create a non-trivial solution in your new language

These will give you three levels of understanding in your language: how to write code in the
language; how to write code with multiple moving pieces and some familiarity with the ecosystem;
and how to write complex, maintainable code.

Learning the syntax is easy enough, especially for a language like Python. Pick up a book or do
some online tutorials. A google search for "learn python online" brought up coursera,
codeacademy, and learnpython. I can't vouch for any of these, but I have colleagues tasked with
learning Python who have used all of these.

Next, you need to start using the language. Don't try to boil the ocean with the new language--start
with the most basic task and build on it from there. My favorite are increasingly complex "Hello
World" applications. This is a great way to start going deeper with a new language. How you add
layers depends on your potential application, but here's an example if you were going to use Python
for web development:

1. Print "Hello World" to the console

2. Run a web server, and send "Hello World" in a response

3. Send a Jinja template with "Hello World"

4. Encode {"data": "hello world"} into JSON and pull it from an API endpoint

5. Put the data in a database, and serve it up from there

6. Send it over a websocket

You can see how you build up a test application with increasing complexity. By the final stage of
this example, you're interacting with libraries for web, templating, sockets, database, and JSON,
and you're dealing with multiple data formats. The steps are going to be different depending on
how you intend to use the language, but the idea will be the same. Start simple and add one layer of
complexity at a time. Make sure that piece works and is well understood before you move on.

Finally, you're going to need to actually build something non-trivial before you can master the new
language. I would even say that it doesn't matter as much what language you build it in--just that
you build it. This is more about gaining a deep appreciation for language design, e.g. OOP, FP, and
procedural; strict and dynamic typing, etc. Some solutions seem highly intuitive for a hello world,
but become painfully complex to bend to your will once an application grows (most ORMs come to
mind).

Unless you have something that you already know you need to do, I don't know that you can force
this final step. Every language has its quirks, including Python; at some point, you'll have learned
enough that you'll just need to start using it.

19.3k Views · View Upvoters


Upvote 32 Downvote

Recommended All

Rukshar Alam, B.Sc Computer Science, Bangladesh University of Engineering


and Technology (2020)
Answered Nov 2

Python is more popular than ever, and is being used everywhere from back-end web servers, to
front-end game development, and everything in between. Python is a true general purpose
language and is quickly becoming a must-have tool in the arsenal of any self-respecting
programmer.

But Python isn't popular just because it's popular. It is easy to learn, reads like pseudo-code, and is
wickedly agile. However, learning any new language can be a daunting task, and finding the right
places and people to learn from is half the battle. That's where this guide can help. This is your
blueprint for making Python easy, fun and rewarding to learn.

Assignment 1: Start With the Basics

At the time of this writing, there are two main versions of Python in circulation: Python 2.7 and
Python 3.2. Which you choose to learn really doesn't matter too much, as the differences will be
minimal—especially to a beginner. But you should know that, while Python 2 has far, far more 3rd
party support, Python 3 is the primary focus of the developers designing the language. The choice is
yours, but if your code acts differently to any given tutorial, make sure you use the same Python
version used in the tutorial.

Wikibooks' Non-Programmers Tutorial for Python

Wikibooks is always a great source to learn something new, and Python is no exception. Here you
will find a solid and to the point series of guides that will teach you the ropes of Python. It doesn't
get too technical, and you can jump into coding something somewhat useful and rewarding pretty
quickly. Because of this, I recommend this site as the best place to start on your Python journey.

The Official Python Tutorial

You won't find a better source of information than the official Welcome to
Python.org documentation. However, if you want to jump right in, as I'm sure many of you will,
this might not be the best place to start.

The content tends to be more technical than wikibooks, which will be helpful later on as you
progress through the language. But, for a beginner, it may just get in the way of what really is a
very simple and beautiful language.
For beginners, the biggest difference between Python 2 and Python 3 will most likely be that
Python 2 can use print without parentheses. Python 3 requires parentheses, but that's all.

Assignment 2: Tutorials and Screencasts

TheNewBoston's Python Programming Tutorials

TheNewBoston's playlists are always great, and you can learn a whole host of languages. ‘Bucky' is
a great instructor because he strikes a really great balance between being funny while also being
easy to listen. I highly recommend any of his playlists—especially his Python playlist. He assumes
zero prior knowledge of programming and will leave you with a firm grasp of the language.

Nettuts+'s Python from Scratch

A little closer to home is Giles Lavelle's intro to Python. Like TheNewBoston's series, Lavelle also
assumes zero prior programming experience.

If you want to see some real-world applications of your applications, or would like to aim
towards web development with Python, this series might be the one for you.
The screencast takes you from nothing to building a dynamic website using a Python web
framework called Django.

ShowMeDo's Python Screencasts

StackOverflow isn't just full of 'newbie' errors and problems.


ShowMeDo has a huge catalogue of Python related videos. While it may not be the most user
friendly experience around, the videos range in level from absolute beginner to the most advanced
Python techniques. It is well worth checking out.

Build a Python Bot That Can Play Web Games

This tutorial is pretty specific in terms of what you're going to learn, and I do not recommend it for
a complete beginner. I feel, however, that it's worth a mention. In this guide, Chris Kiehl shows you
how to build a very interesting Python bot that will play a simple game for you. The tutorial really
goes to show the pow...(more)

Upvote 58 Downvote

Recommended All

Denton Zhou, founder at OpenCourser


Answered May 14, 2017
Originally Answered: What are the best possible ways to learn Python?

Programming’s like riding a bike. Once you learn it you can never forget it.

This is true for a gifted few. I’m not one of them.

I “learned” once Python before. Then I started over and really learned Python.

Both times, I took Introduction to Computer Science from MIT and read books (Think
Python and Learn Python the Hard Way are two that come to mind).

In my first go around, I learned passively. I watched the lecture videos, did the exercises, and took
my quizzes and exams. I felt good about getting an 80+% for my final grade, patted myself on the
shoulders, and called it a day.

Then I let my Python/programming “muscles” atrophy, not realizing they were atrophying until
weeks after the the final exam.

I distinctly remember the first time I tried writing Python on my own after the course had finished.
There was a long list of phone numbers I needed to process, many of them in different formats.

The list might have looked something like this:

'(212)555-5555'
'1-212-555-5556'
'2125555557'

And I needed it to turn into this:

'212-555-5555'
'212-555-5556'
'212-555-5557'

I thought, cool! I could do this. Easy peasy. No problem.

I was woefully mistaken.

Putting together a solution was a struggle. I mean, I couldn’t even get the file to open properly, let
alone parse through it. Eventually I figured it out. Well, someone else did anyway. A good chunk of
my solution came from cobbling code others had written in StackOverflow.

Worse than realizing that I didn’t really know Python anymore was coming to terms with the fact
that I had dumped almost 100 hours into half-learning it.

Learning about the best ways to learn Python the hard way
Eventually, I decided I wanted to learn Python properly. In my mind, Python was a tool that could
help me become more productive and efficient in my work. It might even help me build tools on top
of it. So I retook the course.

My second time learning Python proved successful. So afraid I was of repeating my previous failure
that I did all I could to reinforce my learning.

Based on my experiences, the best way to learn Python then is to


reinforce frequently and thoroughly. Here’s how:

Solve programming challenges

Use these to solidify core concepts you learn until writing Python and solving problems
in it become second nature

Bookmark Project Euler . It’s filled with interesting math problems that are
solveable using Python. Note: You don’t need to be a math whiz to solve most
problems on this site.

Also check out The Riddler from the FiveThirtyEight blog. Some of its brain
teasers are fun. Others are near sadistic. Many can be solved computationally with
Python.

Recreate the wheel

It’s not everyday you’ll hear someone tell you to recreate the wheel, but here it helps
you think about how you might apply Python in practical ways. It’s also encouraging to
see your Python code do something useful. Example projects:

Building a timer (don’t use for mission-critical applications like roasting a turkey
unless you’ve tested your app thoroughly)

Make a weather app with the help of a weather API (like OpenWeatherMap )

Make a calculator. As a challenge, make a graphing calculator.

Help others learn Python

One of the best ways to reinforce concepts you’ve learned is by teaching it to someone
else. Some ways you can do this:

If you’re taking an online course, participate in discussion forums and help


classmates out with questions they have
Also consider answering questions in communities on StackOverflow or Reddit
(/r/learnpython , for example)

Do the above at least once or twice each week

Do the above even after hitting your learning milestones (like finishing an online course)

Think of Python as your adorable pet snake.

When you first get it, it’s unfamiliar with you as you are with it. You have to feed it, care for it, and
nurture it so that it trusts you. If it trusts you, it’ll more likely come to you when you call its name.
Maybe it’ll even stick around forever.

Neglect it, however, and it’ll slither away in search of a more caring owner. Try not to let that
happen.

Disclosure: I’ve never owned a pet snake.

If you find this answer helpful, please follow and check out OpenCourser , a site (built with
Python!) that helps learners find online courses.

9.8k Views · View Upvoters

Upvote 31 Downvote

Recommended All

Luke Petschauer, Software Engineer


Updated Oct 29, 2014

Originally Answered: What are the best resources to start learning Python?

I have been teaching myself programming and Python. Some resources I found helpful:

1. Learn Python The Hard Way is usually recommended enthusiastically, and I thought it
was good. It very much puts the onus on you to investigate and be creative. This can seem
daunting at first; I started with LPTHW, quit and did Codeacademy for a while (mostly
because it provides instant gratification), and then came back to LPTHW and felt like I got
quite a bit from it..

2. Codecademy's Python course is OK, but I really didn't like the IDE; oftentimes it
would reject working code. Like I mentioned above, I came to this after starting – and
stopping – LPTHW. It is fun and easy to make progress at Codecademy, but I don't think
it's an optimal learning environment, especially if you haven't done any programming
before.

3. Think Python & How To Think Like A Computer Scientist: Learning With Python
(Interactive Edition)
Think Python is published by O'Reilly but is also available free, direct from the author.
I'm learning from this textbook now after having done (1) and (2), and feel like I'm
learning quite a few new things, having important concepts reinforced, and getting an idea
of some of the basic ideas of computer science. I've made a Memrise "course" to help me
to remember all the vocabulary: Think Python vocabulary .
One of the things that makes Think Python nice is that you do some work with graphics;
that adds some spice to material that has become familiar.
The text of Think Python has also been used to develop the interactive textbook How
to Think Like A Computer Scientist, which is pretty fantastic. You are able to do
everything in the browser, and the course uses Python 3. I've done some work in it. If I'd
found How to Think Like A Computer Scientist first, I probably would have only used it.

Hope that's helpful.

I've also written this blog post about my experience learning to program with Python: Some
thoughts on learning Python and how to program .

169k Views · View Upvoters

Upvote 421 Downvote

Recommended All

Kunal Suri, Oh Python! Where have you been my entire life?


Answered Jan 30, 2014
Originally Answered: Where can I begin to learn Python?

Since you don't have any programming experience whatsoever, I would suggest trying the CS-101
course at Udacity. It's based on a small subset of Python and gets you started on the programming
journey.

While you are studying this course, I would suggest that you solve ALL the problems in
the CodingBat Python . It's a great collection of problems covering the core coding techniques and
hence make you stronger in programming logic.
Many people say that you should dive head on into Topcoder, Codechef and what not but in my
opinion that's a enthusiasm killer. How can you imagine running when you hardly know how to
walk (don't think about Iron Man, unless you are a Tony Start, in which case you wouldn't have
been asking this question anyway).

So, start with Udacity, cover all the basics there while solving the problems (and watching videos)
on CodingBat Python . Once you are done with that, go for the Google's Python Class . You
should be able to understand things in these videos.

Once you are done with this, start making projects and learn the concepts as their need arises.
Learning by a book can be really boring but you need to do it before you can enjoy programming.

4.1k Views · View Upvoters

Upvote 11 Downvote

Recommended All

John David Reaver, Programmer and Mechanical Engineer


Updated May 13, 2013
Originally Answered: What are the best resources to start learning Python?

I love Zed Shaw's "Learn X the Hard Way" books. The Python one is geared towards first time
programmers [1]. I already knew some python before I read the book, but I still learned a lot. Each
exercise follows a similar pattern:
1. Copy his code exactly. It is a good idea to read the whole page of code, and reread each
function as you copy it to your text editor. I caught myself early on copying down each
character without knowing what I was writing (the whole forest from the trees deal).

2. Get your code to work. He will give you example outputs and you have to debug your way
to the correct outputs.

3. He then explains the concepts introduced in the exercise. Since you have working code in
front of you, you can mess around with it and break things to get a better feel for the new
concept.

4. There is extra credit (which isn't really "extra"; you should just do it) at the end of each
chapter. This usually involves looking up the details of a function or implementing
something new in the example.
If you want to learn the workings of UNIX-type systems (how to use the command line, how to
program in a Linux/Mac environment) then this book will teach you that as well. He also has a
Command Line Crash Course that only takes a couple hours [2].

Zed understands that knowledge is most useful when you can use it without external help or
crutches; he wants to make you as independent as possible, and that requires searching for
information outside of the book. He isn't being lazy (well, maybe he is, but the idea still stands), but
he is trying to get you to learn how to learn.

Good luck!

[1] http://learnpythonthehardway.org...
[2] http://cli.learncodethehardway.o...
15.3k Views · View Upvoters

Upvote 29 Downvote

Recommended All

Shweta Doshi, Co-Founder GreyAtom,Data Science Immersive Learning school


Answered Jul 7, 2017

Firstly, I would like to appreciate your language of choice. Many of the aspirants are usually seen
pondering over the language they should opt for. Honestly there is a lot of contention between R
and Python, while experts seem to be on board with both the languages it is often the freshers who
are seen debating over them.

I personally take a stand for python as Python and R are amongst the most popular languages for
data science, and have their supporters and opponents. While Python is often praised for being a
general-purpose language with an easy-to-understand syntax, R's functionality is developed with
statisticians in mind, thereby giving it field-specific advantages such as great features for data
visualization. You can learn more about the same from - Python or R. What to Choose in Data
Science?

I would recommend not to learn python exclusively and go for a data science program that covers
python in its modules. This way you could save your time and hence money. Look for a program
that covers the following topics in its python module.

Topics to cover
1. Intro to Python for Data Science

2. Intermediate Python for Data Science

3. Importing Data in Python

4. Pandas Foundation

5. Statistical Thinking in Python

6. Python Data Science Toolbox

7. Introduction to Databases in Python

8. Manipulating DataFrames with pandas

9. Introduction to Data Visualization with Python

10. Interactive Data Visualization with Bokeh

11. Network Analysis in Python

12. Merging DataFrames with pand


Disclaimer: I am a co-founder @GreyAtom, assisting engineering talents find
sustainable careers in emerging technologies.

GreyAtom’s highly selective flagship program aims at mentoring working professional and freshers
in kickstarting their Data Science career. Students built projects upon REAL DataSet and Problem
Statements provided by our industry and hiring partners. Program is classroom based and heavily
practice driven. GreyAtom is an ecosystem where students can leverage the best from academia,
industry practitioners and influencers.

Some quick links

Program - http://www.greyatom.com/full-sta...

Chat with Academic Counsellor - You're welcome to share all your doubts, insecurities
paying an ear to which we'll try our level best to guide you to your career path of
success. https://calendly.com/greyatom/co...

2.6k Views · View Upvoters


Upvote 10 Downvote

Recommended All

Anusha Manchala, B-Tech Educatioin & E-learning, Jawaharlal Nehru


Technological University (2016)
Answered Feb 19

Have you recently thought about learning Python – but you didn’t know how to start? Are you in
doubt whether Python would be the right choice? Why not Java, or Scala, Ruby, Javascript, PHP,
C# or Go? Of course there are a lot of good programming languages out there – and every single
one has its pros and cons. Anyway I want to give a simple recommendation: if you are a beginner in
programming – start with Python (or JavaScript). You can always learn another (more
complicated) language later …

Why Python?

Because it is so simple and intuitive. You can almost read and write it like pseudo-code. It ships
with mature and powerful frameworks and libraries for most problems you can think of and is
backed by a strong community. Many new (Open Source) tools that conquer the market are written
in Python. Don’t think of it as yet another scripting language – you can definitely write scalable
enterprise applications with it. Here are some great examples:
Ansible (an excellent DevOps tool for configuration management and deployment
automation)

OpenStack (famous on premise cloud solution)

Django (a powerful framework to develop mature web applications really fast)

Big Data Tools (many data scientists rely on python for their analytics and number
crunching)

IT Security Tools (many pentesters use it to automate their testing and attacks)

System administrators (more and more sysadmins use python to script their jobs)

Large Internet Applications (even many famous internet applications are based on
python, e.g. Youtube, Instagram, Dropbox, …)

Are you convinced?

Want to start learning? There are a lot of free sources out there on the net (YouTube videos, free
tutorials, etc.). But I think the most straight forward and motivating approach will be to take an
online course.

Visit for Python Online Training

486 Views · View Upvoters

Upvote 17 Downvote

Recommended All

Ardit Sulce, Python Instructor, Founder of PythonHow.com


Updated Jun 12, 2016
Originally Answered: How do I learn python?

Roughly, there are three steps to learn Python:

1. Learn the basics


2.Make useless programs
3.Make real world programs

1. First you would need to install Python from Welcome to Python.org . That will install the IDLE
as well which is a Python interpreter. You do need an interpreter to execute Python code. If you
don't like IDLE, other options are Sublime Text 3, iPython, etc. IDLE is good to start anyway.
Learning the basics means learning how to declare variables, assign numbers, strings, lists and
other objects to variables, learning loops, conditionals, learn how to create your own functions and
how to get user input.
Completing this step means you now know the Python syntax. Now, it's time to push it and build
some programs.

2. Build some simple programs such as making a function that takes miles as input and converts it
to kilometers. Then, improve it by adding an input function allowing a user to enter the miles after
running the script.

After that, think of similar programs that integrate other fundamental programming features such
as loops and conditionals.

3. Great, but hey, who needs a program that converts miles to kilometers? Google will be happy to
make the conversion for you right away.
So, now you should try getting into the real world. Try to find tutorials of real world examples and
try out those examples yourself and experiment with them.

Here I would propose my own online course which is a comprehensive guide to learning Python by
building 10 real life applications. You can buy the course on Udemy: The Python Mega Course:
Build 10 Real World Applications

12.4k Views · View Upvoters

Upvote 39 Downvote

Recommended All

Hay Zohar., Senior Fullstack Developer, Founder of imaliveweb.com.


Answered May 17, 2017
Originally Answered: How can I start learning programming in Python?

1. Learn basic Python on Codecademy

This free(!) interactive online course provides all the basics about Python syntax, strings, console
output, conditionals and control flow, functions, lists, directories, loops, classes, file input and
output … It is an interactive course – you can directly start coding the exercises right into your
browser – no installations/setup overhead. This should be your first option to try …

2. Automate the Boring Stuff with Python Programming

This is a very practical online course. You learn Python while automating “daily work problems”.
Users will learn about generating and updating Excel spreadsheets, parse PDFs and Word
documents with Python. It covers how to crawl websites, pull information online, program
keyboard and mouse events and how to write programs to send email notifications … and more.

3. Coding for Entrepreneurs: Learn Python, Django, and More.

The course offers fundamentals and basics of programming and how to use it for entrepreneurship.
It includes information on Python programming, Django (a Python framework for rapid
development) and Twitter bootstrap frameworks. Users also learn basic HTML and CSS, how to
use APIs and how to accept payments through Stripe.

4. Learning Python for Data Analysis and Visualization

This advanced course teaches how to use Python for (Big-) Data Analysis. It provides information
on creating and manipulating arrays using numpy, using pandas to create and analyze data sets
and using matplotlib for better visualization. It also teaches Machine learning concepts and SciKit.

5. The Python Challenge

Another way to learn Python on the internet is through this website: The Python Challenge. It just
provides a set of riddles and you will need some programming know how to solve them. It is a nice
and entertaining way of getting a little bit better every time you solve the next (harder) riddle.
There is no registration required and therefore you can start solving right away. Riddles start
simple and get more and more complex – so both beginners and expert level programmers can
learn something there.

6. Google’s Python class

This free class introduces beginners with basics of Python programming. It provides insights on
strings, lists, sorting, dicts and files and regular expressions. It also contains video lectures and
exercises. It is not the most “motivating” course out there – but it is free and published under a CC
license …

18k Views · View Upvoters · Answer requested by Huzefa Baloch

Upvote 26 Downvote

Recommended All

Ben Davidow, Freelance Web Developer http://benthewebdev.com/


Updated Jan 8, 2015

Originally Answered: How do I learn Python?


Totally depends on what type of learner you are...

If you like classroom learning:


Check out Udacity, a free and top-notch online course video series on programming in Python
taught by Stanford & UVA professors. http://www.udacity.com/

If you prefer books:


Check out Michael Dawson's "Python Programming for the Absolute Beginner," an
exceptionally clear and engaging read. Dawson is a game programmer and the book is structured
such that each chapter culminates in designing a game. http://www.amazon.com/Python-Pro...

If you want the best of both worlds:


Check out "Learn Python the Hard Way." an online chain of 50-or-so learning exercises,
each of which builds on the last. If you run into any walls (which you will) Zed Shaw, the site
creator, will answer your questions or give you hints. It's called the hard way because it forces you
to jump in head first, but it saves you time in the long run since you're learning things the right
way. http://learnpythonthehardway.org/

Regardless, make sure that you're getting your hands dirty from the start with some
mini projects. Programming, as much as anything, is something you learn by doing.

Good luck!

For tips on boosting your focus, mood, and brainpower, follow my new Quora blog The Mental
Edge

47.4k Views · View Upvoters

Upvote 105 Downvote

Recommended All

Vipin Kushwaha, works at Larsen & Toubro ECC


Answered Feb 17, 2017

Top 30 detailed Websites for learning python:

1. Code Academy
Code Academy is a free, online learning center for all things programming. They offer lessons in
a variety of languages and topics, not just Python.

What makes it special, is that you can write code directly in your browser and see the results pan
out live. This is useful when you’re starting out because it eliminates the need to setup a
development environment for practice exercises.

This portal is best suited for beginner to intermediate coders. During your time working with
Python through Code Academy, you’ll build your own tip calculator tool, and a board game based
on Battleship.

Python topics you will learn include common syntax, strings and console output, conditional and
control flow, loops, functions, file input and output, lists and dictionaries, and much more.

Price: Free

2. TutorialsPoint

TutorialsPoint is another site like Code Academy that offers free tutorials with the option to test
out code directly in a browser window.

They offer one of the most comprehensive tutorials for novice coders that will take you through the
basics and beginner stages of the language all the way to expert level tasks. You will learn how to
set up a Python development environment, write basic syntax, work with variables, operators and
loops, and much more.

What makes TutorialsPoint’s guide so comprehensive is that it also covers advanced Python topics
like database access, CGI, and game programming, the use of multithreading, XML processing,
networking, GUI design, and more.

Price: Free

3. Codementor – Hire Expert Developers for On-Demand Mentorship & Freelance


Projects

Codementor is designed for intermediate to expert developers who are already working with the
language in question. There are some tidbits for beginners scattered throughout, but this is
certainly not a portal for novice coders to spend a majority of their time.

Each post on the site is a separate tutorial that covers a specific focus, like sorting Git Authors in an
app with code, integrating Node.js with Python, using Python decorators and more.
Price: Free

4. PythonChallenge

If you’re the type of person that would much rather be challenged and put under a small amount of
pressure to increase your learning capacity, PythonChallenge is right up your alley.

It isn’t the prettiest site in existence; actually, the design is downright ugly. However, the
challenges and lessons you will participate in are invaluable to learning Python. There are 33 levels
to master currently, with over 2,000,000 visitors to the site to date.

Price: Free

5. Google’s Python Class eBook

Due to the nature of the material, Google’s Python Class eBook is best suited for intermediate to
experienced coders. It is well written and clearly explains various concepts related to Python, yet
it’s more about programming theory as opposed to the practical application of it. Therefore, you
won’t find any step-by-step tutorials or in-depth guides.

This makes it a great travel companion for Python developers who want to stay in the loop while
they are on the move.

There are multiple books available, and you can download companion exercises to execute locally
on your machine. This allows you to work with and test out different snippets of code.

Price: Free

6. Welcome to Python.org

When in doubt, you can always turn to the official documentation for a language. Python.org is
the official channel for the developers of Python, so you can find plenty of references, materials,
and resources on working with the language.

As you’d expect, they have a great beginner’s tutorial that will walk you through the basics. Then,
you’ll learn about more advanced topics like different Python libraries, distributing modules, and
much more.

Price: Free

7. Learn Python the Hard Way eBook


Once again the challenge is the main focus. Learn Python the Hard Way is a free eBook that you
can read in full. ...(more)

Upvote 1 Downvote

Recommended All

Animesh Srivastava, Computer Science & Engineering


Answered Aug 20, 2017

Originally Answered: How do I start learning Python?

Python is an increasingly popular language, and it’s also a favorite language teaching first time
programmers. Following is the list of beginner’s books to choose from:

A Byte of Python

A Byte of Python is a beginner’s book on Python by Swaroop C H. “If all you know about
computers is how to save text files, then this is the book for you,” the site says.

It’s been used in several academic programs, such as the above mentioned UC Davis course, and by
the NASA Jet Propulsion Laboratory .

It’s available for both Python 2.X and 3.0, but only the 3.0 version is still updated. A hard copy
version is available.

Learn Python the Hard Way


Learn Python the Hard Way is a beginner’s programming book written by Zed Shaw. It was
written for Python 2.6.

Shaw is known as the creator of the Mongrel and Mongrel2 Web servers, and more recently as
the author of this lively manifesto .

Non-Programmer’s Tutorial for Python

Non-Programmer’s Tutorial for Python 2.6 and on-Programmer’s Tutorial for Python 3 are
products of the WikiBooks project.

Python Programming

Python Programming is another WikiBooks guide to Python. It’s one of the texts of the MIT
course mentioned above.

The Python Tutorial

The Python Tutorial is the official tutorial from the Python project. It’s used in the MIT course.
You can find a tutorial for Python 2.7 here and for 3.0 here .

Think Python
Think Python: An Introduction to Software Design was written by Allen B. Downey an Associate
Professor of Computer Science at the Franklin W. Olin College of

Engineering. It’s is available in multiple formats, including a hard copy, here . It was written
before Python 3.0, but has been updated with footnotes to explain discrepancies.

There are a few variations of this book which may cause some confusion. Think Python is the
online version of Python for Software Design: How to Think Like a Computer Scientist, which is
an updated version of How to Think Like a Computer Scientist: Learning with Python. It has also
been ported into other language such as C++ , Java and Ruby .

Downey has several other computer science books available for free from his publishing
company Green Tea Press .

1.3k Views · View Upvoters · Not for Reproduction

Upvote 2 Downvote

Praveen Kumar, in love with Python, applied mathematician, Microsoft


Answered Aug 15, 2013

Originally Answered: How can I learn a new programming language in a couple of weeks, 3 hours per day? I have basic
knowledge of programming in C. What online resources can I use?

I learnt the basics of python from Google's Python Class . The video lectures are awesome and the
tutorials are very well written. You should also do the exercises provided in this course. Since
Python is a high level language, you will find the language constructs very intuitive and whenever I
write code in python, I feel more like I am writing english text in contrast to cryptic C/C++.

Its also fun to solving python programming riddles on The Python Challenge .
I would also recommend reading Core Python Programming (2nd Edition): Wesley Chun:
9780132269933: Amazon.com: Books . Quoting one of the reviewer of this book on amazon.
Having been programming, in a scientific role, for a decade, I recently took up Python. This book
was the text used with a short course on Python I took, and I can see why. As other reviewers
have said, Python has excellent documentation; what the Python documentation usually lacks is
both practical examples and an explanation of why. This book gives both of those things and in a
very readable way. It's been the fastest and simplest way for me to get to grips with object-
oriented concepts, and has been a great reference for most things I've needed to do.

Another one:
Definitely worth 5 stars. The book clearly explains its purpose, and the author makes his
methodologies known in the beginning as to how he will approach teaching the language. His
explanations are clear and concise, and it does not contradict the DOCS available on the Python
web site. He's both humorous and informative, with a relaxed style of writing.
The code in itself is neatly organized, clearly explained, and overall, it works. He does cover a lot
of Python basics, the majority of the book are Python basics. He also covers advanced topics such
as network programming, extending Python through C/C++ modules, and multithreading. All of
which are important, being able to write distributed applications, writing responsive programs,
and being able to extend the language are all equally important. Python's power is clearly
explained and logically thought-out in this book. I would recommend it to anyone who wants to
learn Python but are new to programming.

I learnt a great deal from this book and used this as a reference for all the three GSoC projects that
I completed.

6k Views · View Upvoters

Upvote 11 Downvote

Recommended All

Vidhi Bagadia, B. Tech Computer Science and Engineering, Assam Don Bosco
University (2019)
Updated Aug 22, 2017
Originally Answered: How do I learn Python programming? What are resources?

When I started with Python, I was not new to programming. So my learning path would be a little
different than what I'll be writing here.
For an absolute beginner, I've seen people suggest Codecademy. I have not tried it, but if so many
people are leaning on to it, I guess it must be pretty good.

Python is a fairly easy language. If you pick it up once, it'll be easier to ride on it all the way.

What I'll show you is a mixture of books and video lectures. I am not a big fan of learning
the initial stage of any domain through sites like udacity/coursera/udemy. It doesn't work for me.

Youtube proves brilliant for me. Try:

1. The New Boston

2. Sentdex

They have some really great beginners to intermediate Python tutorials.

Make sure to go to Python Documentation for any concept that you have confusion in. The
documentation is really helpful. It will solve most of your problems and look really interesting to
read when you have some experience with the language.

Here's a book that should be a further learning equipment: LEARN PYTHON THE HARD
WAY. It's pretty concise. Amazing resource.

The book that made me fall in love with the language is: AUTOMATE THE BORING STUFF
WITH PYTHON. This will ensure that you create something from what you've just learnt.

After you complete the beginner's course from YouTube (or any other lecture platform), come to
this book.

The first part of the book is a brief go-through for all concepts like variables, tuples, lists,
dictionaries, flow of control, etc. Give it a quick look - will only firm your syntax.

And then, put your skills to some action. The second phase of the book will walk you through some
examples of how you can produce some useful application with Python.

Congratulations, you've just cleared a lot of Python concepts. But it doesn't end here.

Start exploring librares (requests/beautiful soup/selenium/matplotlib/many more)


and frameworks (flask/django) and ui (tkinter).

Python is a vast terrain, but certainly a beautiful view. Catch the pun once you start learning
Python.

766 Views · View Upvoters


Upvote 11 Downvote

Recommended All

Yash Sharma, I know a thing or two about programming.


Answered May 27, 2016

Thanks A2A.

And Woooaahh… 5 A2As on one question. And on such a famous one. I don’t think I will have
something what hasn’t been already said here but here are my two cents.

I learned Python because I had to work on Raspberry Pi. Also I already had experience in C, C++
and Java. So I was not new to this domain.

First you will be needing to make your basic in Python strong, very strong.

I will list some of the courses that I took. You might have already taken these but just make sure
that you know the basics by doing these.

Python

Introduction to Computer Science and Programming Using Python (be sure to complete its
sequel for advanced python.)

https://www.coursera.org/special... (complete these specializations for an through knowledge of


python)

Python tutorial (visit this site for examples of code that you don't understand)

Now that we have cleared out the sources its time practise the language because because practise
what you just is as good as ash.

For beginners Hackerrank is greatly advised. Project Eluer alxo ahs great libraury of problems.

HackerRank, About - Project Euler

Use this site when you get a little experienced.

http://www.codewars.com/?languag...

Then stop now you have some idea about how to convert a problem into code. Now what need to do
is Python repos from github. Read the documentation and how the code is implemented.
You can find some of such projects here - What's a good open source project on GitHub for
beginners to contribute to?

I myself am not at all a expert coder but I have had the good fortune to meet few. I will try to give a
few traits of expert programmers that I have personally noticed

1. They keep the documentation of the language/library they are using handy.Python 2.7.11
documentation Python 3.5.1 documentation These are the ones for python.

2. They know their tools. Like every good iron smith a good programmer knows the ins and
outs of his IDE, OS and anything that is/will be used in coding.

3. They document their code. It's important not only for others who might use their code but
for themselves too as they might need to look their code after sometimes.

4. They don't reinvent the wheel. Whenever possible they try to use a code that is already
their. But this only be done when one has enough experience and understands the
limitations of the borrowed code.

5. They keep practising. One way you can do this is by signing up on Build software better,
together and keeping a streak by pushing at least one new code everyday. Do this for a
few months forcefully and after that it will become second nature to you.

6. But most importantly they know that they can always improve.

Hope I helped.

Cheers.

P.S. Some question that you might have in mind-.

Yash Sharma's answer to Why can't we just learn one programming language and focus on
algorithms and problems solving?

Yash Sharma's answer to How do I learn competitive programming as a beginner?

Yash Sharma's answer to How do I start learning or strengthen my knowledge of data structures
and algorithms?

482 Views · View Upvoters · Answer requested by Nagadeep Reddy, Ashwani Tiwari, and 3 more

Upvote 5 Downvote

Recommended All
Vidisha Joshi
Answered Oct 5

Python is an interpreted, object-oriented, high-level programming language with dynamic


semantics. ... Python's simple, easy to learn syntax emphasizes readability and therefore reduces
the cost of program maintenance. Pythonsupports modules and packages, which encourages
program modularity and code reuse.This is a formal definition of python.

In simple words, Python is a very good language to be learn, and I say this because i studied
this language and it is damn good.

For learning python language , I highly recommend you to go through the Codecademy
Courses ,these courses are very good for a beginner . I also experience that.And you can also go
through the Alison courses, these are also good. So, go through these two sites for learning will
definitely help you and these courses are free of cost but they need two things your time
and your effort that you put.

And the most important thing to be know while learning any programming language is that you
should have to give sufficient time to it.Because it is not a thing to be happened in just one night,
you have to do a lot practice as we know “Practice makes a man PERFECT” .
And if you have the basic knowledge of any programming language it will be an advantage for you
to understand but if you are not aware……you don’t need to be worry but should
have interest and patience.

And i also suggest you if you have any doubts about how can become a programmer ? or Which
programming language is to be learn? or any doubt regarding the CS and IT field or latest
technology then you can also to go the Hitesh Choudhary channel on youtube.

I hope these information help you. :-)

Thank You :-)

2k Views · View Upvoters

Upvote 27 Downvote

Recommended All

Warren K Guerrero, studied at Minneapolis Community and Technical College


Answered Jul 4, 2015

Originally Answered: How do I learn Python?

So you want to learn programming. If you are beginner then I would suggest you to learn Python,
because Python has some good points:
enforces good programming style (indentation is meaningful)

OO available but not enforced

Exceptions used but not enforced

is not a toy or academic language - much real world work is done in Python

allows concentration on algorithms and problem, not on language features and


shortcoming.

is cross platform and has a powerful set of libraries


is safe - it has dynamic run time type checking and bounds checking on arrays

has powerful built-in data types - dictionaries, lists, sequences, functions, sets (in 2.4)

has powerful built-in control structures - simple looping over sequences, map,
generators, list comprehensions, regular expressions...

requires less lines of code for any given problem, and is more readable - thus greater
productivity.
If you are still thinking about which programming language should I learn first then see
this infographic created by CarlCheo.com and get your answer by yourself.

Further, beginners read this: IDE stands for Intregrated Development Environment. It is a tool
that facilitates developers to write code, which normally consists of a code editor, compiler and
debugger.

Here is a compiled list of the best courses, tutorials, books etc. for Python programming language.
Official site: Welcome to Python.org
Official Python getting started guide

Start with a code editor like Sublime Text , then maybe move on to IDE
like PyCharm or PyDev for more complex projects.

Courses
Udemy – The Ultimate Python Programming Tutorial

Treehouse – Python Basics course

Free

Udacity – Intro to Computer Science

Codeacademy – Python

Google’s Python Class

Free Interactive Tutorial


Learn Python

Books
Python Programming: An Introduction to Computer Science

Python Programming for the Absolute Beginner

Think Python: How to Think Like a Computer Scientist (Read online for free here )

Learn Python The Hard Way (Free)

If you want to create websites using Python, try Django :


Official Django getting started guide
Book: Test-Drive Development with Python (Read online for free here )

708 Views · View Upvoters

Upvote 3 Downvote

Recommended All

Nava Ragini, Software Test Engineer at GCRC (2014-present)


Answered Jul 5, 2017

Originally Answered: What is the best online resource to learn Python?

Core Elements of Programs

Simple Algorithms such as bisection, newton raphson

Functions

Recursion - divide and conquer

Objects - Tuples, lists,functions as objects and dictionaries

Debugging - black box, glass box testing, Integration and unit testing

Efficiency and orders of growth - complexity, asymptotic notation

Memory and search - search and sort methods, hashing

Classes

Object Oriented Programming - Inheritance

Plotting - using matplotlib

Simulations and random walks - stochastic programming

Sampling and Monte Carlo methods

Statistical thinking

Using randomness to solve non-random problems

Curve Fitting

Optimization - knapsack problem

Graphs -DFS, BFS, cliques, min-cut

Dynamic programming
Its just so much to learn. The best part is the programming exercises, each and every one of it will
make you think harder and in the process will teach you python.

According to me this was the best class I have attended as it filled those gaps in my understanding
of OOP concepts I learned in the past and also introduced python to me. The method of teaching by
Eric Grimson is one of the best, you just can not take your mind off the concepts when he is
teaching.

If you already know all these things and just want to know the language in short period, then I
think this is probably not a correct class to invest time in. But if anyone out there is new to
computer science or wants to brush-up things a bit and want to learn python I would highly
recommend this course.

Software Testing

Python Facebook Groups

Python Step by Step Tutorial

Introduction to Python

Variables and Data Types in Python

489 Views · View Upvoters

Upvote 3 Downvote

Recommended All

Debanjan Sengupta, Speaks with computers in Python


Answered May 27, 2017

It depends upon a lot of things. You have not mentioned whether you have any experience of
programming before hand and if you have so what language have you used and for what purpose.

If you have already programmed before, learning a new language is nothing more than learning the
syntax. You can just pickup any book or any online material if you are comfortable with that and do
it in a day or two. Then you can become habituated with that syntax through practice only. It is a
lot similar to learning a new language other than ypur mother tongue.

Now, assuming that you are new to conputer science and have never programmed before, things
take a totally new turn. Learning the syntax will do you no good. It would be similar to mugging up
the dictionary. You will not understand a thing. So my suggestion is to do a Intro to Computer
Science course which has a project based curriculum and uses Python in the process. It will not
only teach you the language, but also make you aware about computing principles, computational
thinking, problem solving and a hell lot more.

Iwould not provide a long list of courses as they are already provided in the wiki just at the
beginning of the answers section. But I will specify two courses which may be very helpful to you.

Introduction to Computer Science 6001 by MIT offered at edX . It is for the absolute
beginner.

Intro to Computer Science at Udacity . This one is a more project based approach.

Pick the one that suits you.

Good luck.

If you like my answer please upvote it and follow me for similar answers.
361 Views · View Upvoters · Answer requested by Nallapaneni Venkatesh

Upvote 4 Downvote

Recommended All

Blake Martin, 5 years experience in Hadoop,Data Science,Spark,Scala


Answered Jan 30, 2016

Informal Introduction to Python

In the following examples, input and output are distinguished by the presence or absence of
prompts to repeat the example, you must type everything after the prompt, when the prompt
appears; lines that do not begin with a prompt are output from the interpreter. Note that a
secondary prompt on a line by itself in an example means you must type a blank line; this is used to
end a multi-line command.
I Have Better Resource For You You Can Visit This Link-:Online Python programming
Training and tutorial

Many of the examples in this manual, even those entered at the interactive prompt, include
comments. Comments in Python start with the hash character, #, and extend to the end of the
physical line. A comment may appear at the start of a line or following whitespace or code, but not
within a string literal. A hash character within a string literal is just a hash character. Since
comments are to clarify code and are not interpreted by Python, they may be omitted when typing
in examples.

Some examples:

# this is the first comment spam = 1 # and this is the second comment # ... and now a third! text =
"# This is not a comment because it's inside quotes."

Using Python as a Calculator

Let’s try some simple Python commands. Start the interpreter and wait for the primary prompt,
>>>. (It shouldn’t take long.)

The interpreter acts as a simple calculator: you can type an expression at it and it will write the
value. Expression syntax is straightforward: the operators+, -, * and / work just like in most other
languages (for example, Pascal or C); parentheses (()) can be used for grouping. For example:

>>> 2 + 2 4 >>> 50 - 5*6 20 >>> (50 - 5.0*6) / 4 5.0 >>> 8 / 5.0 1.6

The integer numbers (e.g. 2, 4, 20) have type int the ones with a fractional part (e.g. 5.0, 1.6) have
type Float We will see more about numeric types later in the tutorial.

The return type of a division (/) operation depends on its operands. If both operands are of type int
, FLoor is performed and an Int is returned. If either operand is a Float , classic division is
performed and a float is returned. The // operator is also provided for doing floor division no
matter what the operands are. The remainder can be calculated with the % operator:

>>> 17 / 3 # int / int -> int 5 >>> 17 / 3.0 # int / float -> float 5.666666666666667 >>> 17 // 3.0 #
explicit floor division discards the fractional part 5.0 >>> 17 % 3 # the % operator returns the
remainder of the division 2 >>> 5 * 3 + 2 # result * divisor + remainder 17

With Python, it is possible to use the ** operator to calculate powers

I Have Better Resource For You You Can Visit This Link-:Online Python programming
Training and tutorial
>>> 5 ** 2 # 5 squared 25 >>> 2 ** 7 # 2 to the power of 7 128

The equal sign (=) is used to assign a value to a variable. Afterwards, no result is displayed before
the next interactive prompt:

>>> width = 20 >>> height = 5 * 9 >>> width * height 900

If a variable is not “defined” (assigned a value), trying to use it will give you an error:

>>> n # try to access an undefined variable Traceback (most recent call last): File "", line 1, in
NameError: name 'n' is not defined

There is full support for floating point; operators with mixed type operands convert the integer
operand to floating point:

>>> 3 * 3.75 / 1.5 7.5 >>> 7.0 / 2 3.5

In interactive mode, the last printed expression is assigned to the variable _. This means that when
you are using Python as a desk calculator, it is somewhat easier to continue calculations, for
example:

>>> tax = 12.5 / 100 >>> price = 100.50 >>> price * tax 12.5625 >>> price + _ 113.0625 >>>
round(_, 2) 113.06

This variable should be treated as read-only by the user. Don’t explicitly assign a value to it — you
would create an independent local variable with the same name masking the built-in variable with
its magic behavior.

In addition to int and Float...(more)

Upvote 22 Downvote

Akansha Arora
Answered Jan 4, 2016

Originally Answered: What is the best online resource to learn Python?

I understand your need to learn a widely used high level programming language. The design of
Python language philosophy emphasizes code reliability and the syntax allows the programmers to
express concepts in fewer lines of code than in other languages like Java or C++. The professional
demand of programmers with python knowledge is also a must today. There must be a number of
websites offering python courses. While looking I found courses listed here quite beneficial.
There are about 14 courses to choose from that allows be to choose what suits me the best.
I think only you can define what is best for you. I found the All in One Python Development
Suite course very beneficial for me. This course is comprehensive and can be taken up by both
beginners as well as advanced learners. Python Development Suite is best suited for system
engineers, mobile app developers, web application developers, software engineers and candidates
with technical background.

All the best!

8.7k Views · View Upvoters

Upvote 16 Downvote

Recommended All

Aakhya Singh, Co-Founder, Codesdope


Answered Jun 15, 2016

Python is the fastest growing programming language. Its evidence can be seen from the fact that
Google, Instagram, Youtube, Pinterest and even Quora use Python. Moreover it is comparitively
easier to learn than other programming languages. This is the reason why many programmers all
over the world are switching to Python. So make a strong hold over Python as this language is going
to rock the future technologies.

Coming to the question, the best website where you can start Python from scratch and
gradually master over the language at your own pace in a reasonable time period
even if you have no coding background is Codesdope . It makes learning so simple and
thought-provoking that you will just start to love programming.

Codesdope is designed which suits all your requirement. You can learn from examples and
also discuss in discussion section. We have also put together practice questions at the end of
each part of a course so that you can learn to apply the concepts just after you have understood
them. Last but not the least, there is also a forum for discussion each and every doubt - big or small
- that you have so that you can also remain in touch with us 24/7, or at least as frequently as
possible.

You will just start loving coding while going through the tutorials.
Python introduction, Learn to compile and run python in Windows, Linux and Mac OS X, uses of
python, hello world in python

1.1k Views · View Upvoters


Upvote 21 Downvote

Aakhya Singh
We will soon be including Python 3 and other courses also :)

Ian Atkin, studied at Computer Programming


Answered Oct 17, 2015
Originally Answered: How do I start learning Python?

I learned Python out of necessity. I was asked to work on a project that required the inclusion of a
data model that already existed. The work I did was to create a RESTful API around the data
model. I got my Python "sea legs" by Googling everything, and working through each new question
one at a time. If I needed to understand program flow, I Googled it. If I needed to know how to
iterate over something, or create a condition, I Googled that. I eventually read a couple of books
and it made my life much easier.

Needless to say, I don't recommend anyone actually follow my example.

1. Get a feel for the language by going through Codecademy's Python track: Python

2. Jamie Chan's book is a great resource to get you up and running quickly: Python: Learn
Python in One Day and Learn It Well. Python for Beginners with Hands-on Project.
(Learn Coding Fast with Hands-On Project Book 1) 1, LCF Publishing, Jamie Chan -
Amazon.com

3. Read one or more of the many free Python books available: Python Books

4. If you want to take a slightly longer, but more in-depth route, there's always The Python
Tutorial at Welcome to Python.org

And it goes without saying, don't let your knowledge get stale. Use it every day and you'll soon
become expert.

2.4k Views · View Upvoters · Answer requested by Atika Maryam

Upvote 14 Downvote

Recommended All

Vamsidhar Vupmandla, BOG Member at MITS (2010-present)


Answered Dec 13
Python Programming :

Course Description: This course introduces how to solve problems using flowcharts and
programming concepts. The focus is on developing students to understand and apply the concepts
of programming using python. A practical introduction to computing that will build students
confidence and familiarity with computer programming.

Course Objectives:

1. To make the student understand problem solving techniques and their applications

2. Students will be able to understand the syntax and semantics of python.

3. Get acquaintances with classes and objects, stacks and queues using python.

List of Experiments:

Week 1

a) Develop animated models using scratch tool.

Week 2

a) Develop the flowchart for finding a number is even or odd.

b) Develop a flowchart for displaying reversal of a number.

c) Develop a flowchart for finding biggest number among three numbers.

Week 3

a) Develop a flowchart for swapping two values using functions.

b) Develop a flowchart to sort the list of numbers.

c) Develop a flowchart to find largest element in an array.

Week 4

a) Implement Python script to read person’s age from keyboard and display whether he is eligible
for voting or not.

b) Implement Python script to find biggest number between two numbers.

Week 5
a) Implement Python Script to generate prime numbers series up to n.

b) Implement Python Script to check given number is palindrome or not.

c) Implement Python script to print factorial of a number.

Week 6

a) Implement Python Script to perform various operations on string using string libraries.

b) Implement Python Script to check given string is palindrome or not.

Week 7

a) Define a function max_of_three() that takes three numbers as arguments and returns the largest
of them.

b) Write a program which makes use of function to display all such numbers which are divisible by
7 but are not a multiple of 5, between 1000 and 2000.

Week 8

a) Define a function which generates Fibonacci series up to n numbers.

b) Define a function that checks whether the given number is Armstrong.

Week 9

a) Write a program which accepts a sequence of comma-separated numbers from console and
generate a list and a tuple which contains every number. Suppose the following input is supplied to
the program:34,67,55,33,12,98. Then, the output should be: ['34', '67', '55', '33', '12', '98'] ('34', '67',
'55', '33', '12', '98').

b) With a given tuple (1,2,3,4,5,6,7,8,9,10), write a program to print the first half values in one line
and the last half values in one line.

Week 10

a) Write a python script to perform basic dictionary operations like insert, delete and display.

b) Write a python script to find frequency of words in a file using dictionaries.

Week 11

a) Write Python script to display file contents.


b) Write Python script to copy file contents from one file to another.

Week 12

a) Define a class named Rectangle which can be constructed by a length and width. The Rectangle
class has a method which can compute the area.

b) Define a class named Circle which can constructed by radius. The derived classes Area,
Circumference uses methods called calArea(), calCirc() respectively to calculate area,
circumference of circle.

Week 13

a) Implement Python script to develop stack ADT and its operations.

b) Implement Python script to evaluate postfix expression.

Week 14

a) Implement Python script to develop queue ADT and its operations.

b) Implement Python script to perform tree traversals.

NOTE: Concepts related to Lab programs will be covered in Lecture hours.


Course Outcomes:

At the end of the course, students will be able to

1. Understand problem solving techniques.

2. Use python programming to implement solutions.

3. Identity the stacks and queues for a given problem or application.

4. Analyze and design logic for a given program....(more)

Upvote 3 Downvote

Recommended All

Michael Leachim, Interested in FP(working with Clojure)


Updated Dec 17, 2015

Originally Answered: How do I start learning Python?

These are just duplicate quora questions about learning python:


1. What are the best , ideally electronic, books or courses for learning Python?
2. What is the best tutorial site for learning Python?

3. How can I start learning Python effectively?

4. I want to learn to code with Python and Django (web framework). What's the best way to
start for a programming newbie? Are Python/Django the best?

5. What is the best online resource to learn Python?

6. Is Codecademy a good website to learn Python?

7. I want to learn Python. From what source should I learn the concepts?

8. As someone interested in learning Python, should I start with 2.x or go straight to 3.x?

9. I am 22 years old and willing to learn Python, though I don't know much about
programming. Should I start learning Python?

10. I want to learn python... Any online tutorials to kick start my python programming?

11. Python (programming language): How long will it take to learn Python just enough to
develop a web-based start-up prototype?

The best way to start learning anything nowadays is to RTFM. I have learned it that way.
Everyone I know have learned anything this way.
Incrementally. Step by step, via reading source, documentation, resolving difficult cases and
writing code. There are no short paths. If you want to be a decent engineer, you have
to build your 10 000 hours from the ground up.

Seriously. Quora is flooded with duplications. What can we do about this?

12k Views · View Upvoters · Answer requested by Kiran Gadhe and John Wlison

Upvote 29 Downvote

Recommended All

Emily Ford, former Freelancer


Answered Feb 28
I will break up the answer into multiple steps so that it becomes easier to read.

If you read the answer from beginning to end and follow through and practice what has been
mentioned in the answer then you will surely go from beginner to pro in Python.

Step 1: Learning the basics.

If you are completely new to Python then I would recommend you to get started by installing
Python right away. Just make sure that you start working with Python 3.x instead of 2.x as Python
2 is outdated.

Resources:

You can start learning Python right away from their official documentation 3.6.4 Documentation

OR
If you need to learn everything in detail then I would recommend this course which covers
everything from installation to building projects : The Complete Python Masterclass: Learn Python
From Scratch

Once you are down installing Python, you can start to work on basic concepts which include:

1. How to accept input from user.

2. Data types in Python.

3. Variables & In-place operators.

4. Control structures like the if & else-if statements.

5. Loops: For & while loops.

6. Range function: one of the most important and widely used in Python.

7. Functions & Exception handling.

Step 2: Advanced concepts

Now lets move on to some important and intermediate concepts in Python:

1. Dictionaries.

2. Tuples.

3. Lists.

4. List slicing.

5. List comprehension.

6. Strings & string formatting

7. Map & filters.

8. Lambda functions.

9. Regular expressions.

Make sure that you master above concepts as they are one of the most crucial concepts in modern
Python.

Step 3: Important Python frameworks

1. Tkinter: To build GUI based desktop applications.


2. Django: A back end web framework which allows you to build awesome web applications.

3. Flask: Another awesome Python web framework which is lightweight, flexible and easier
to use as compared to Django.

4. Django REST Framework: Allows you to build web APIs using Python.

Step 4: Start working on projects.

Once you are fluent enough, start working on your own project.

In the beginning start with building something small such as a simple calculator.

Here is an exhaustive list of projects which you can start working on:

Beginner & intermediate level projects:

1. A simple calculator.

2. Web crawler to crawl news sites.

3. Text editor.

4. Facebook auto poster, auto liker.

5. Todo list application.

6. A twitter bot.

7. Temperature converter.

8. EMI calculator.

9. Text to speech converter.

10. Meme maker.

11. A simple MP3 player.

12. Stopwatch with lap functionality.

13. PDF generator.

14. Weather widget.

15. Virtual dice.

16. Credit card validator.

Advanced level projects:


1. Facial recognition for authentication.

2. Spam detection across a website.

3. Smart home automation systems using arduino.

4. Personal web server using RaspberryPi.

5. Motion detector.

111 Views · View Upvoters

Upvote 2 Downvote

Recommended All

Davya Jain, Passionate coder


Answered Jun 25, 2016

Originally Answered: Can I learn Python by myself? Is it tough to learn? What is the best book to start?

Python is a very simple and readable language. You don’t have to take care of curly brackets, white
space or that complicated syntax as in C, Java and other programming languages. As you stated
that you already know C and C++, you will find it even easier and will grab its concepts in lesser
time.

Now coming to your next question, instead of any book, I would rather suggest you to
consider Codesdope . Its course material is very well designed and the most suitable for learners.
You will find a large number of topicwise practice questions separately in the practice section and
its developers will solve your doubts in its doubt section. Practice questions for Python are difficult
to find elsewhere. Its such a dynamic website proving you wonderful content listing all sources of
errors and a variety of practice questions and at the same time clearing all your doubts.

Python introduction, Learn to compile and run python in Windows, Linux and Mac OS X, uses of
python, hello world in python

1.6k Views · View Upvoters

Upvote 18 Downvote

Recommended All

Sunny Dimalu, Cyber security Consultant


Updated Oct 7

Step 1:
Download an IDE go to the below link and download community editions.

This is the best IDE for python hands down.

Download PyCharm: Python IDE for Professional Developers by JetBrains

Step 2:

You can learn python from here-> Python tutorial .

Probably best free python tutorial on internet:

Start with basics get familiar with syntax.Python’s syntax is pretty easy and little different from
traditional languages.Python is very very high level.

example: a for loop example :

for i in range(1,34,1):

print(i)

pretty different from traditional languages right.

Step 3:

when it comes to data processing Python is the best.Python have very powerful functions to process
and manipulate data like list, dict, tuples, sets, strings etc.

Master them.

Step4: Once you are familiar with it’s syntax dont even waste a single minute start doing mini
projects.This is where you will learn actual python.Projects teaches you how to put things togather
.How to solve problems with different and efficient solutions.

Once you make few projects then you have luxury from here you can choose you career path.Python
is so powerful you can do everything with it.

Web Development

Want to be web developer learn Django or Flask.Django is recommended.You know when you
stream a video on youtube there is bunch of python code being executed on server and Our Quora
also uses python.

GUI App development

want to develop GUI apps for desktop Learn Tkinter Pyqt. I recommend Tkinter because i use it.
But i have heard nice things about Pyqt do your research.

Machine Learning

Python is best language if you want to go for machine learning.Machine learning is the future.

Good Luck.

914 Views · View Upvoters

Upvote 12 Downvote

Recommended All

Mitalii Surve, Data Scientist (2015-present)


Updated Feb 6

Originally Answered: What is the best way to go about learning Python?

You know what I really hate?

Is that people often tell you where you can learn programming/coding etc. but they don’t really tell
you where you can gain the technical training, which is the most important aspect in today’s
generation.

Well, the best way to learn Python is by accelerating your learning skills and make them practical.

But why is Python programming trending and why it became an important part of my
life?
I’m not here to preach about Python or any programming language but yes I can tell you why I
prefer Python and why it is the most sought programming language right now.

If you’re a first time programmer, learn Python because it’s easy and readable.

Python can be used for web development and data science.

The coding with Python is faster and more stable.

I used the framework Django and then moved to Flask, once I started working with these
frameworks I never looked backed to PHP.

This programming language allows you to code very quickly.

Going from ideation to implementation is quite critical in a startup world hence most
startups and product based companies are looking for candidates with technical
knowledge in Python.

Want a higher pay scale? Learn Python today and grab a handsome takeaway.

Python is more diverse, it’s different.

Well, Python is the future of AI and Machine Learning

Python is slowly taking over the preferred language for computer science.

Makes sense right?

What now?

Find a purpose to why you want to learn Python:

Web Development - If you’re interested in becoming a developer, try going into web
development using Python.

Data Science - You love statistics and data, you can consider getting into data science
using Python.

The awesome thing about Python is that most data scientist prefer this programming language in
their field. The best I can suggest you is to get into Data Science learning Python today.

So, what is the salary structure of a data scientist then?

A Data Scientist, IT earns an average salary of Rs 6–7 lakhs per year in a product based
startup/company.
Want to learn Python for Data Science?

The best way is to follow a simple three step formula:

1. Acquire these skills from the best experts in the industry.

2. Work on projects and build your portfolio.

3. Get hired in a product based company and startup as a data scientist.

If you already have basic programming knowledge, I would recommend the below resources to you
-

Udacity - they offer you with upgraded curriculum and help you learn on the
technologies used by the industries, they also provide you nano degree programs and
certifications, but certifications don’t actually help you get a job.

Simplilearn - they offer you with good learning skills but the fees are a bit expensive,
although you are provided with projects and live sessions you still land with certifications
and no job assurance.

edWisor - this is one such platform that not only helps you get skilled on these
technologies but also helps you get hired in a product based companies/startups for full
time role. There are trained candidates I know of who have been hired from edWisor, you
can always give this platform a try.
My goal here is to help one choose the right career path and get a job in your programming
journey.

Good luck!!

1.2k Views · View Upvoters

Upvote 11 Downvote

Recommended All

Boon Jia Shen, Engineer


Answered Jul 22, 2013

Originally Answered: How can I learn a new programming language in a couple of weeks, 3 hours per day? I have basic
knowledge of programming in C. What online resources can I use?

There are a few concepts that I think will be quite useful to keep in mind when learning Python.
These are concepts not found in C. I'm going through them quite briefly because I believe a quick
Google search will give you instructions that will be far more eloquently phrased than mine.

Duck typing
If you've programmed in C long enough, you'll probably start thinking in terms of datatypes when
you declare variables. For example, a factorial function may start with:

long factorial(int n){


...

In Python, it'll probably be something more like:

def factorial(n):
...

This means the function will accept an integer, a float, a string, or really any datatype of n. It's
really up to the designer to test for the methods required of the input variables.

Functional programming
If there's one thing that Python exposed me to, it's the idea of functions being arguments and
results of other functions, which again, isn't a paradigm well supported in C. Concrete examples of
this are the map function and lambdakeyword.

>>> incrementor = lambda(x): x + 1


>>> incremented = incrementor(5)
>>> print incremented
6
>>> integers = map(int, [-2.2, 3.1, 5.6])
>>> print integers
[-2, 3, 5]

It's interesting to note that Guido van Rossum, creator of Python, has been quite vocal in his
objections over the functional aspects of Python. I guess this means you should turn to other
languages to learn functional programming well.
The fate of reduce() in Python 3000
Origins of Python's "Functional" Features
Why isn't Python very good for functional programming?

Links:
http://docs.python.org/2/library...
http://docs.python.org/2/referen...

Interpreted language
OK this isn't really an important concept to understand - 15 minutes into learning Python, you'll
probably notice that you can type stuff into a interpreter and the interpreter will return some
output. But there's a lot of functionality that comes with this interpreter.

Say you forgot whether the modulus operation is done with mod or a % sign.

>>> mod(17, 5)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'mod' is not defined
>>> 17 % 5
2
Or if you can't remember how to use the range function.

>>> help(range)

References
If you're familiar with C, I really don't think learning the basic syntax of Python will be a problem.
But if you're writing Python like how you'd write in C, I think it kind of defeats the purpose. It's
good to know why programming languages are designed the way they are.

The courses I learnt Python from were Intro to Computer Science Class Online
(CS101) and Design of Computer Programs . And of course you'll probably be referring to the
official Python documentation over and over.

Good luck!

219.4k Views · View Upvoters

Upvote 321 Downvote

Recommended All

Prashant Kumar, pythonist


Answered Jan 24, 2016

Originally Answered: Which is the best way to learn python?

Python is easy to use yet very powerful. Most of the books or video tutorial will teach you the
basics, that's good but doing great things with python is main objective of learning Python. So here
you go.

1. You can buy the book "Automate the Boring Stuff with Python: Practical
Programming for Total Beginners" by Albert Sweigart or read it online here .
This book made me realize what wonders we can do with python. It covers most
interesting topics like Web Scrapping, Sending Email and Texts, editing images using
python, downloading files from internet,using API,editing documents,excel, pdf files and
automating stuff. The projects at the end of chapters are very intuitive . I learnt a alot
from it. I personally liked the ease with which author explained how to scrap data from
internet. I have written many scripts to automate my tasks. I used some of these
techniques to build an android app " Musica " which downloads songs from internet
instantly. Musica can be downloaded from Musica . Even though the app is made in
java the web scrapping technique remains the same.

2. Now if you want to make something like a small/big search engine like google(may be just
for fun), you need to know more about how you can access web data using python. The
course "Using Python to Access Web Data from University of Michigan "
on Coursera is where you can invest some time.You will learn about different web
services like SOAP,REST. XML,JSON,OAUTH,etc.

I hope you enjoy learning from the above resources.

All the best.

1.2k Views · View Upvoters

Upvote 4 Downvote

Recommended All

Aaliya Sharma, an IITian who loves to code addictively


Answered Jun 26, 2016

I started the Python course in Codesdope two weeks before and everything is going quite well. I
am thorough with the basics of all the topics which I have read and I can solve questions on Project
Euler very easily within minutes now. With this pace, I estimate to complete the Python course by
the end of next week. Truly a fabulous website for learning programming, atleast the best among
the ones which I have seen till now. And yes, the practice questions given separately for each topic
are really very helpful. I tried searching questions for Java, C++ or any such languages in a number
of sources but could not find any. Finally, my search ended here and its truly awesome. Even its
discussion section is also very responsive. I haven’t such a doubt solving anywhere else. This is the
best site for learning Python.

Python introduction, Learn to compile and run python in Windows, Linux and Mac OS X, uses of
python, hello world in python

254 Views · View Upvoters

Upvote 13 Downvote

Recommended All

Alexander Galkin, Working as Software Engineer at Microsoft


Answered Sep 10

Originally Answered: What should I know before I start Python?

I was teaching several Python courses to students from 3rd-6th grade, and from my experience
with Python as a learning aid I should say, that you only need to know how to start IDLE (the
development environment) and how to find tutorials online. Nothing more.

This is a very friendly (both in terms of its indentation-based syntax and tutorials) language with
very low requirements for learners. If this is your first programming language, you’ll enjoy it and
learn many CS concepts through it. If not, you’ll find it very easy to learn and intuitive to read and
write.

Anyway, don’t hesitate, just go for it!

5.5k Views · View Upvoters

Upvote 22 Downvote

Recommended All

Awantik Das, Corporate Trainer | Spark | Data Science | Machine Learning


Answered Oct 30, 2016

If this is the question in your mind, you have already started to fall in love with Python. I lead
corporate training at zekelabs, & have trained 10,000+ professionals. Based on my understanding,
learning Python can be achieved in the following way. Technical learning should be always layered.
Start with the easiest book like Think Python & end with bible for Python like Learning Python. In
Python, there are always deep concepts in every topic. Read Think Python for high level Python
understanding & later get deeper using Learning Python. From my personal experience of teaching
you may follow the following steps to get yourself into next stage. [1]

1. Use Python interpreter to learn fundamentals quickly. To learn about string utilities use
help(str).

2. Explore other data structures like list,set & dict using help(list), help(dict) & help(set)
respectively.

3. Learn about Python Object Model - Generally this is given in last chapters of books but this is
why Python behaves the way it does. Read here

4. Time to start using IDE like Sublime Text & write control flows using if, else, while, for.

5. Don't forget to learn about the 'in' operator.


6. Learn about defining various types of function definitions - very handy in learning object
oriented programming & frameworks like Django. Read here

7. Plug into Object Oriented Programming - define class, create objects, constructors, member
functions, static variables, static functions, inheritance.

8. Go a mile further - Iterators, Generators, Lambda, Modules, Functional Programming - Map,


Filter, Reduce

9. Please Note : This is just the beginning. Happy Journey with Python till you tie the knot with it .

Feel free to reachout to me for any help at awantikdas@zekelabs.com . I would love to help you.

Footnotes
[1] zekeLabs | Classroom & Online Training

894 Views · View Upvoters · Answer requested by Priyanka Sharma

Upvote 2 Downvote

Recommended All

Amar Shukla, former Lead Engineer at Samsung Research India, Delhi (2011-
2015)
Answered May 10, 2017
Originally Answered: How do I learn Python just from online sources?

Read Python documentation, Follow Learn Python the Hard Way from beginning to end and
code. Continuous coding is what makes us developer. Initially you will think that you can’t learn it
since you have to search on google or see tutorial side by side even for silly errors, issues but
gradually you will get comfortable and will have an idea about how to solve a particular type of
error.

When you are done with all the tutorial and courses, Try to think about a simple issue which you
face in your daily life. For example, How awesome it would be if I can create a command line utility
in which if I enter a movie name, all its information gets displayed from IMDB. If you try to code
something of your interest, you will learn it fast. Since Python is an awesome language using which
you can create script, web application or desktop application therefore you can go for any
interesting idea and implement it.

Key is code, try to write code as much as possible. Avoid copy paste code from tutorial.When you
type code yourself, you gradually remember functions.
If you get stuck at some point you can post your question on stackoverflow, you can message me as
well, if you don’t get your answer.

Happy coding!

237 Views · View Upvoters

Upvote 2 Downvote

Recommended All

Bikram Kumar, B.Tech Computer Science and Engineering, Indian Institute of


Technology , Dhanbad (2019)
Answered Dec 13
Originally Answered: How do I start to learn Python?

There are many resources available online for learning Python. It depends on you which type of
content suits you.

For video contents:

1. Python Courses | Coursera

2. Search YouTube for “Bucky Python Tutorials”.

For written content:

1. LPTHW (Learn Python the Hard Way).(It’s name is only hard, trust me :) )

2. Tutorials from Tutorialpoint.com .

These will get you through the basics. Once you are done with these, you will get a hang of what do
you need actually need for programming in Python. Then you can search any search engine for the
specific content that you need.

Hope it helps. :)

122 Views · View Upvoters

Upvote 3 Downvote

Recommended All

Vivek Joshy, I love python. I just love it.


Answered Jul 19, 2016
Originally Answered: Which book should be followed to learn Python in 1st semester by an engineering student in India?

Hi,

Like the others here I also think Learn Python The Hard Way by Zed Shaw is a great book to
learn python. But I don’t think it is good for beginners who have never programmed before or took
biology instead of computer science in school.

So my personal recommendation is Head First Python by O’RIELLY. It covers all the


fundamentals of Python. It does not go over advanced topics like anonymous functions, generators,
decorators, meta classes etc.

Learning python does not guarantee that you will pass your first semester Python course. You
would still need to learn how to implement common algorithms with python

Here is a good set of books to learn Python (Hint:I’ve read all of these):

1. Head First Python by O’RIELLY by Paul Barry: This book is very good if you are a
beginner to python since it has visual aids and help keep the attention of the reader. Basic
concepts like classes and modules. It also starts off some scripting on android and custom
web apps.

2. How to think like a computer scientist: Learning with Python by Allen B.


Downey: This book is pretty much the standard in most universities and hence is also a
good start to learn python. The book takes a special effort to teach python through
algorithms. Focuses on object orientation, polymorphism and generalisation of code.

3. Learn Python The Hard Way by Zed Shaw: This book is especially good if you have
some prerequisite python knowledge. Starts off some testing and focuses on object
orientation. Like the title says, the book make you work to learn python and expects you to
do each of it’s exercises. The author makes sure the book is definitely not easy for new
programmers but also not for experienced ones. This book is a good middle ground.

4. Python Programming Certificate Series by O’RIELLY: This a set of four books


that is meant for serious python programmers. Even the first book starts off difficult
jumping right to object orientation. The second book focuses on advanced unit testing,
gui, emails and database manipulation. The third book is even more advanced oop,
advanced regular expressions and even time based computations. The last book is mainly
a glue for all the other books and ends with decorators, metaclasses, partial functions,
multi-processing and multi-threading. A link to the free pdf for the series can be
found here .
Good Luck :)

9k Views · View Upvoters

Upvote 22 Downvote

Recommended All

Rosemarie Chiu, Digital Marketer & Consultant


Answered Apr 29, 2015

Originally Answered: What is the best source to learn Python for someone who is already a programmer?

I start learning it from Codecademy and then go the Codementor Learning Center to get more
tutorials and resource.Through Codementor’s Learning Center, you can get tutorials, videos,
guides, and Python tips & tricks from experienced Python developers.

To level up your skill, you can get a project and learn with experts here 1:1 Python Help from
Proven Experts

Some useful Python Tutorials


Python Tutorials for Beginners and Programmers

Python Beginner Tutorial: for Loops and Iterators

Python 2.7 vs Python 3.4 ─ What should Python Beginners choose?

Introduction to Python Decorators

How to Create Custom Exceptions in Python

A SQLAlchemy Cheat Sheet

Python Framework Comparison: Django vs. Pyramid

How to Set up NumPy on a 64 bit Windows OS

Python Q&A with #1 Stack Overflow Python Expert

Stack Overflow Legend Martijn Pieters: Python Optimization and How it Can Affect Your
Code

6 Useful Python Libraries Recommended by #1 Stack Overflow Answerer

Martijn Pieters on the Future of Django

Python Internals: Codementor Office Hours with Martijn Pieters


Online Videos

Carte-Blanche, a Django Permission Framework for Rapid Prototyping, with its creator,
Eric Neuman

Introduction to Machine Learning & NLP: Building a Spam Classifier

Stack Overflow Legend Martijn Pieters: Python Optimization and How it Can Affect Your
Code

It may be a bias for me as I work in codementor and also a mentee here, but I'm sure these
resources I collect for you may help you somehow! :)

Happy coding!

13.2k Views · View Upvoters

Upvote 26 Downvote

Recommended All

Ivanleoncz, Contributor at Stack Overflow (2016-present)


Updated Feb 28

Straight to the point:

1. Create a Virtual Machine .

2. Install a NIX OS like, Ubuntu, Centos, Debian, etc.

3. Open up a Terminal (on Ubuntu: CTRL+ALT+T)

4. Run “python3” and then you have a shell for QUICK tests.

5. Take a look at this site for initial references and, of course,…

6. …practice as much as you can!

Some notes:

If you have a Mac, forget about the steps 1 and 2. AFAIK, OS X comes with Python (I’m
not sure about which version…).

I do not recommend Python development on Microsoft OSes. Period. Nothing against


Microsoft, but when it comes to coding, I cannot guarantee that an OS 90% oriented to
GUI is a good choice. Besides that, Microsoft OSes don’t give you the same freedom of
exploration and interaction with the OS, than a NIX system can give you.

Many NIX OSes, already have a Python interpreter installed.

Python 2 is not the best option (although some apps still use it), since that it will “retire ”
in 2 years. So, Python 3 :).

After gaining some knowledge about the language, learn about git and build a repository
on GitHub, in order to get used with the idea of “versioning” your code, programs,
modules, scripts, etc.

Create an account on StackOverflow (watch out for the community rules) and try to get
involved with relevant questions and answers, giving details, examples, and so forth.

20.8k Views · View Upvoters

Upvote 56 Downvote

Recommended All

Hasan Farooq, Faced beginner problems in programming


Answered Sep 18

Originally Answered: How can I learn Python easily and fast?

Why fast?

I think you should understand some concepts before. If you just want to start straightly with
Python, skip the “first” one.

Harvard: This is CS50 (to understand basics)

It will take up to 2–3 months. Give it good time even 4–6 months if you need. If you
will be good at basics, you can do next things in a better way.

MIT: Introduction to Computer Science and Programming in Python (your first


programming language-Python)

It is your time to put your basic understanding in action!

Code Chef to practice (practice will make you better! )

Coursera | After you have done the above mentioned courses, you can take any course
on this website.

Like Books? “How to Think Like a Computer Scientist” is a great book for Python.
2k Views · View Upvoters · Answer requested by Md. Mahedi Hasan Hridoy

Upvote 4 Downvote

Recommended All

Prashant Bhandari, studies Computer Science at Howard University (2019)


Updated Nov 16

Originally Answered: How can you start learning Python?

I started my programming journey with the Python programming language. It’s amazing and really
easy to learn. These are the steps I recommend for learning Python is the order:

1. Start out with Codecademy they have an interactive python tutorial. It covers the basic
of programming like Loops, If statements, functions, list, dictionary, Classes, and objects.
It will probably take 2 - 3 days to complete if you are really dedicated. If you finished this
and re-do it again then you will have a fairly good knowledge of python.

2. Next, read a book to get the detailed knowledge of what you just did in Codecademy. I
suggest “How to think like a Computer Scientist ” it’s really beginner friendly and free.

3. Learn Object-oriented programming for Python. Learn what a class is, how to create a
class and create objects from a class. Understand what Classes and Objects are and how
they are related. This is the most important thing to learn if you want to build something
with python or any other Object-oriented languages.

4. The book I suggested also covers some GUI library features of python which is Tkinter.
Try to get some knowledge of what it is and learn to make some small GUI programs like a
Calculator or a check generator.

5. By now you should have a good knowledge of Python and programming in general. This is
the point where you should really push your self and start doing something real with
Python. I suggest looking at Django . It's a Python web-development framework. You
can make your websites with this framework. I suggest watching some
Youtube tutorial first and understand what a framework is and where does this
(Django) fall in the context of a website. And start to code.

While your are learning you may not understand things and somethings might not make sense at
first and leave you frustrated and upset. I have been through all of that and had days when I was
questing my intelligence. Trust me on this, you will make it, just trust yourself and keep on going.
You will be amazed at yourself for how you turned from know nothing to a real programmer. Just
keep going, passion is something that will come along the way.
ps: Somewhere in the middle, learn to use pdb , will save you from all-nighters.

Best of luck. :)

2.7k Views · View Upvoters · Answer requested by Tobi Ojo

Upvote 9 Downvote

Recommended All

Aleksey Matiychenko, Senior Partner/CEO at Risk-AI (2008-present)


Answered May 7, 2017

Originally Answered: How do I learn Python?

First. Congratulations on taking first steps. Here are a few pointers.

You can’t learn programming by just watching youtube. You need to do something. Preferably
something that interests you.

Picking python is a good idea. It is a good language to learn and is very popular. If you can spend a
little money I would buy Raspberry Pi computer. The cheapest version with Wifi enabled runs at
$10. You would need a keyboard a mouse and monitor (you probably already have one) but the
whole things is likely to cost under $100.

The beauty of raspberry pi is that it allows you to build some fun projects that will teach you to
program in a way that is not boring. You can build a home security system or play minecraft while
changing your environment through python code, etc.

If you don’t want / can’t buy raspberry pi then just find a project that would interest you.
Something that would be fun to solve through programming. May be a homework assignment in
school or something related to any of your hobbies. Awhile ago Pokemon Go was popular. There
was a python script that allows you to find locations easily.

Once you find a problem to solve just stick to it. When learning programming (speaking from
experience) you need to get to a light bulb moment (“oh I got that now!”) and after that things
become simple. But the only way to do that is to keep at it.

But again. Forget the tutorials (not completely but mostly). Start doing things and lookup
particular problems you face. Handle each problem in small steps. Once you figure out each small
step proceed to next. Once your program is finished look over it and try to make it better. Then do
it again and again. Even experienced developers often start with messy code just to make sure that
the problem is doable.
3.6k Views · View Upvoters

Upvote 11 Downvote

Recommended All

Anand Takawale, works at Forbes Marshall


Answered Jul 24, 2013

Originally Answered: What is the best online resource to learn Python?

If you are new to programming and also would like to learn python, I would
recommend Introduction to Computer Science and Programming provided by edx(specifically
MITx), taught by Eric Grimson, John Guttag and Chris Terman. Even though there is no current
offering of 6.00x, I will advice to enroll whenever new session is announced. If you want to
download lectures check this site MITx: 6.00x (Introduction to Computer Science and
Programming) Mirror

Introduction to Computer Science and Programming on mit opencourseware is also a good


option but might be hard to grasp as lecture length is about an hour.

What you will learn in 6.00x?


1. Core Elements of Programs

2. Simple Algorithms such as bisection, newton raphson

3. Functions

4. Recursion - divide and conquer

5. Objects - Tuples, lists,functions as objects and dictionaries

6. Debugging - black box, glass box testing, Integration and unit testing

7. Efficiency and orders of growth - complexity, asymptotic notation

8. Memory and search - search and sort methods, hashing

9. Classes

10. Object Oriented Programming - Inheritance

11. Plotting - using matplotlib

12. Simulations and random walks - stochastic programming

13. Sampling and Monte Carlo methods


14. Statistical thinking

15. Using randomness to solve non-random problems

16. Curve Fitting

17. Optimization - knapsack problem

18. Graphs -DFS, BFS, cliques, min-cut

19. Dynamic programming

Its just so much to learn. The best part is the programming exercises, each and every one of it will
make you think harder and in the process will teach you python.

According to me this was the best class I have attended as it filled those gaps in my understanding
of OOP concepts I learned in the past and also introduced python to me. The method of teaching by
Eric Grimson is one of the best, you just can not take your mind off the concepts when he is
teaching.

If you already know all these things and just want to know the language in short period, then I
think this is probably not a correct class to invest time in. But if anyone out there is new to
computer science or wants to brush-up things a bit and want to learn python I would highly
recommend this course.

P.S. For a person completely new to computer science, let me remind you the class will be hard so
set aside 12 hours/week, but it would be worth investing your time in.

62.7k Views · View Upvoters

Upvote 57 Downvote

Recommended All

Giles McMullen-Klein, Medical Researcher


Answered Jan 12

Learn the basics and then practice. Keep practicing and keep trying new things. Play with code,
change the parameters, see what happens. Ask yourself whether you can do things betters or
differently. Use google, go on Stack Exchange. Just keep doing it, keep using it.
There are loads of ways to learn the basics. Many are free. Or you can buy books or online courses.
Keep your eventual goal in mind and let that influence what you learn. So if you want to learn
python to make websites, then learn from books or sites that cover Django and flask as well as the
basics. If it’s data science that is attracting you to python, then learn with a bias in this direction
(pandas, numpy etc)

I have some favourite books. The best general python book, for me, is Automate the Boring stuff.
Python Crash Course is also very good. But you will find what works for you.

Here is a video I made reviewing some of the best python books:-

There’s also my own YouTube course, which is free.

Learn Python in 3 Months - YouTube

Bookmark every site that you find useful and make a note of code that you like, code that’s clever,
that did something in a way that you would never have thought.

Learn how to use different python libraries, the more python code you see, the better you will
become. Follow tutorials and then see if you can do the same thing with the book closed.

Once you’ve learnt the basics, it can be difficult to know how to move forward. Projects are
important, try to use python to achieve things you actually want to do. If you can’t think of any
projects, then Python Playground (No Starch Press) is a very good book. It has some great projects
that will give you an idea how to use code on a larger scale.

If it’s data science or machine learning that is luring you to python, then you’re also going to have
to make sure you have the maths skills to go with it. Learn these too, as it’s really difficult to do ML
and Data Science well without understanding the algorithms. Go on Kaggle, read the scikit learn
site, keep reading, keep doing and keep learning. It can be a lonely path and sometimes you feel
like you’re completely lost, but you will be able to do it, you will make progress and you’ll be
pleased you persevered.

Don’t spend a fortune on learning python. There are loads of places that will promise to teach how
to program in 4 weeks if you spend a few thousand dollars. You really don’t need to do this. There
are no shortcuts. It’s an incremental process. Like everything, you won’t be very good to start with,
and you’ll improve. Enjoy the journey. It’s a great language to learn and it will make you a member
of a community of very talented people that are doing incredible things.

85 Views · View Upvoters · Answer requested by JoveMars

Upvote 1 Downvote

Recommended All

Aniketh Gireesh, Season of KDE'16, Google Summer of Code'17 'KDE'


Answered Nov 13, 2016

Why Python? Because it is so simple and intuitive. You can almost read and write it like pseudo-
code. It ships with mature and powerful frameworks and libraries for most problems you can think
of and is backed by a strong community. Many new (Open Source) tools that conquer the market
are written in Python. Don’t think of it as yet another scripting language – you can definitely write
scalable enterprise applications with it. Here are some great examples:

Ansible (an excellent DevOps tool for configuration management and deployment
automation)

OpenStack (famous on premise cloud solution)

Django (a powerful framework to develop mature web applications really fast)

Big Data Tools (many data scientists rely on python for their analytics and number
crunching)

IT Security Tools (many pentesters use it to automate their testing and attacks)

System administrators (more and more sysadmins use python to script their jobs)

Large Internet Applications (even many famous internet applications are based on
python, e.g. Youtube, Instagram, Dropbox, …)

1. Learn basic Python on Codecademy


This free(!) interactive online course provides all the basics about Python syntax, strings, console
output, conditionals and control flow, functions, lists, directories, loops, classes, file input and
output … It is an interactive course – you can directly start coding the exercises right into your
browser – no installations/setup overhead.

2. Automate the Boring Stuff with Python Programming

This is a very practical online course. You learn Python while automating “daily work problems”.
Users will learn about generating and updating Excel spreadsheets, parse PDFs and Word
documents with Python. It covers how to crawl websites, pull information online, program
keyboard and mouse events and how to write programs to send email notifications … and more.

It is designed for office workers, students and system administrators who want to get things done
and increase their productivity. It is not a typical “academic course” that would focus on the maths
behind the scenes. Recommended to everybody who has repeating (boring) tasks to do in his daily
business … definitely worth the “invest”.

3. Coding for Entrepreneurs: Learn Python, Django and More

The course offers fundamentals and basics of programming and how to use it for entrepreneurship.
It includes information on Python programming, Django (a Python framework for rapid
development) and Twitter bootstrap frameworks. Users also learn basic HTML and CSS, how to
use APIs and how to accept payments through Stripe.

Learn Python and also dive into useful frameworks that will enable you to start an online business.
The price tag might seem a bit high – but it is worth the money. It is not a course that just teaches
some basic programming – it teaches how to use state of the art technology in the real world to
actually earn some money.

4. Learning Python for Data Analysis and Visualization Course

This advanced course teaches how to use Python for (Big-) Data Analysis. It provides information
on creating and manipulating arrays using numpy, using pandas to create and analyze data sets
and using matplotlib for better visualization. It also teaches Machine learning concepts and SciKit.

Many companies are working on “Big Data” projects. Opensource tools like Apache Hadoop,
Apache Spark, NoSQL Databases or Tensorflow are already changing our world. And those
companies are looking for data scientists – paying high salaries. If you want to start with Python
for data analysis – then this course is for you.

5. The Python Challenge


Another way to learn Python on the internet is through this website: The Python Challenge. It just
provides a set of riddles and you will need some programming know how to solve them. It is a nice
and entertaining way of getting a little bit better every time you solve the next (harder) riddle.
There is no registration required and therefore you can start solving right away. Riddles start
simple and get more and more complex – so both beginners and expert level programmers can
learn something there.

6. Google’s Python Class

This free class introduces beginners with basics of Python programming. It provides insights on
strings, lists, sorting, dicts and files and regular expressions. It also contains video lectures and
exercises. It is not the most “motivating” course out there – but it is free and published under a CC
license …

If you want to learn Python – start with 1 (codeacademy) to get the basics real quick and to check if
Python is something for you. After that, choose one of out of 2,3 or 4 – depending on your
background and your future plans and learn some more detailed and practical things about Python.
The paid courses do cost some money – yes – but they are well done, will be more motivating than
crawling all the net for free stuff and will get you closer to your goals much faster.

Source: IT Security, Big Data, Deployment Automation

Thanks for A2A.

466 Views · View Upvoters · Answer requested by Kausthubh

Upvote 1 Downvote

Recommended All

Aayushi Johari, Python, Java & Android enthusiast


Updated Feb 12

Python is simple and incredibly readable since closely resembles the English language. It’s a great
language for beginners, all the way up to seasoned professionals.

You don’t have to deal with complex syntaxes, let me give you an example:

If I want to print “Hello World” in python, all I have to write is:


As a newbie in python, I would recommend you to go through the basics as to completely
understand the syntax and the basic fundamentals. I will share some of the free content available
on the internet in the form of blogs as well as YouTube videos.

First, you should be clear with the a basics. Following are some topics which I believe are the most
important for Python programming.

Blogs:

Top 10 Reasons to Learn Python

Python Tutorial

Python Programming basics With Examples

Python Numpy

Python Matplotlib | Data visualizations In Python

Scikit Learn - Machine Learning using Python

Youtube Videos:

Once you understood the fundamentals of python, you can move ahead and scrape some details
from other websites. To perform web scraping, you can refer the below video:
Next, if you also want to explore the power of python, you can refer to the below video of Django,
which is its popular framework.

I hope this information will help you. Happy learning! :)

601 Views · View Upvoters

Upvote 5 Downvote

Recommended All

Maunil Vyas, Third year ICT engineering student


Updated Sep 12

Originally Answered: I am a mechanical engineer with no knowledge of programming. What is the best way to learn
Python?

Hello,

It’s good to see your willingness for the programming. I appreciate your question. You mentioned
that you are from Mechanical background. So, I assume you don’t have rudimentary knowledge
about how actually the art of programming works and how to interpret the pseudo code.
I am going to tell you a long path to learn things for this art. There are no shortcuts. Believe me,
ultimately your target is to understand any given code and it’s logical functionalities with some sort
of syntax interpretations, and you should be able to write pseudo code for different tasks.

So, the question is: How to build the logical viewpoint for the programming ?

First it is required to be familiar with the way pseudo code is written. Then try to read pseudo codes
for different online platforms and push yourself to understand what’s going on, like suppose I want
to sort 10 numbers. The basic approach is to pick a number from starting index and compare it
with all other numbers, then aside it, say put it into a basket, follow the same approach for all
indexes. Ultimately you will end-up having the shortest number. Again repeat the same procedure
and you will have an ascending order series. So, you can see this is how actually our mind computes
the sorting procedure. With computers we can do the same and the tool is “programming” to make
computer to follow the same procedure, only thing changes here is that we divide the above task
into certain small tasks and then we write those with proper programming syntax. It is like we
provide commands to the computer to do something and computer will take the responsibility to
take decisions instead of our mind and lead towards the desired result.

I hope the basic idea is clear. Let’s see how you can easily understand the pseudo code by
incorporating the Sub division policy.

You have to first read the pseudo code and then try to identify the sub divisions, I mean you divide
the code into parts and understand it’s functionality individually. Let say if I want to divide the
above sorting strategy into parts, I will do it like first initialization then looping followed by the
comparison and at last decision making . It’s not compulsory to apply the same methodology to
understand the code, But I prefer this one when I was in my initial stage. You can have your own
and it’s fine. But the goal must be clear that you required to “Understand the code” before you
start doing programming.

Let’s now move towards python.

I believe Python is one of the easiest programming language. If you are clear with logical steps you
can easily convert it into python code. I suggest you to pick any book related to python
programming which is for the beginners. Explore online platforms too, there are many. Don’t
emphasize on one specific book, programming is an art which can be only learn by practicing not
by reading one such specific book. I still consider my self to be an average guy, because there are
infinite number of things for me to learn.

Remember things take time, so be patient.


You can also refer Python tutorial . there are many more things available online. you will
definitely find all those.

I hope the above thing help you.

Best Luck.

483 Views · View Upvoters

Upvote 4 Downvote

Recommended All

Bhavishya Pohani, Quora is my first love


Updated Jan 7, 2015

Originally Answered: What are the best resources to start learning Python?

Follow this link.


Introduction to Computer Science and Programming | Electrical Engineering and Computer
Science | MIT OpenCourseWare
It contains recitation videos and assignments which can be found on the left corner of the page.
The videos can be downloaded from youtube
EDIT 1: When I wrote this post, I had just started python. Now I have done a bit of work in it so I
can write more about it.
So, the most important thing is to actually start programming. A theoretical knowledge of python is
worthless at best.
So, how to start that?
I have seen several competitive programming websites but the one I found the best
for beginners is HackerRank .
This is because-
1) The questions are neatly segregated into various difficulties
2) The questions are neatly segregated into topics and subtopics making it simple for a beginner to
start programming in a specific subdomain.
3) Each question possess a tutorial if you are not able to solve the question.

Once one is comfortable with HackerRank he/she can definitely start participating in TopCoder,
CodeChef, Codeforces and so on.

1.3k Views · View Upvoters

Upvote 7 Downvote
Recommended All

Nirmala Reddy, Software Test Lead (2016-present)


Answered Aug 3, 2017

Originally Answered: How do I learn Python?

Python Step by Step Tutorial

Python Step by Step Videos

How to Learn Python?

Python is a General Purpose, Interpreter based, and Object-oriented Programming


Language.

Python is used for,

i. Web and Internet Development


ii. Scientific and Numeric
iii. Education
iv. Desktop GUIs
v. Software Development
Python is often used as a support language for software developers,

First Focus on Python Environment Setup (Download and Install Python...)

1) Python Language Fundamentals


i) Comments in Python
ii) Data Types
iii) Variables
iv) Operators
v) Conditional Statements
b) Loop Statements
c) Branching Statements
vi) Data structures: Lists, Tuples, Sets, Dictionaries...
vii) Functions
viii) Modules

2) Object Oriented Programming


i) Class & Method...
ii) Constructor and Destructor
iii) Inheritance
iv) Polymorphism
vi) Data Abstraction
vii) Encapsulation

3) String Handling
4) Exception Handling
5) Regular Expressions
6) Python IO Operations and File handling
7) Working with Databases
8) Multi Threading
9) Networking Programming
10) CGI (Common Gateway Interface) Programming
10) GUI Programming Etc...
--------------------------------------------
Note:

You take any Computer programming language like C, C+, Java, Perl, Python, 80% concepts are
same for example, Variables, Data Types, Operators, Conditional statements, Loop Statements.,
functions are common in every programming language, syntax may vary from one language to
another.

Some concepts may vary from one language to another for example In C Language (Structured
programming) we have Functions but no Methods, In Java language (Object Oriented
programming) we have methods, and Functions in C are equivalent to Methods in Java.)

466 Views · View Upvoters

Upvote 6 Downvote

Recommended All

Rohan Singh, Graphics Engineer at Microsoft


Answered Jun 12, 2017

Originally Answered: What is the best online resource to learn Python?

New to programming

If you're learning your first programming language these books were written with you in mind.
Developers learning Python as a second or later language should skip down to the next section for
"experienced developers".

To get an introduction to Python, Django and Flask at the same time, consider watching
the self explaining tutorials at: hackr.io

This short 5 minute video explains why it's better to think of projects you'd like to build
and problems you want to solve with programming. Start working on those projects and
problems rather than jumping into a specific language that's recommended to you by a
friend.

CS for All is an open book by professors at Harvey Mudd College which teaches the
fundamentals of computer science using Python. It's an accessible read and perfect for
programming beginners.

If you've never programmed before check out the Getting Started page on Learn To Code
with Me by Laurence Bradford . She's done an incredible job of breaking down the
steps beginners should take when they're uncertain about where to begin.

Learn Python the Hard Way is a free book by Zed Shaw.

The Python projects tag on the Twilio blog is constantly updated with fun tutorials you
can build to learn Python, such as the International Space Station Tracker with Flask and
Redis-Queue , Choose Your Own Adventures Presentations using Flask and
WebSockets and Martianify Photos with OpenCV .

A Byte of Python is a beginner's tutorial for the Python language.

Code Academy has a Python track for people completely new to programming.

Introduction to Programming with Python goes over the basic syntax and control
structures in Python. The free book has numerous code examples to go along with each
topic.

Google put together a great compilation of materials and subjects you should read and
learn from if you want to be a professional programmer . Those resources are useful not
only for Python beginners but any developer who wants to have a strong professional
career in software.

The O'Reilly book Think Python: How to Think Like a Computer Scientist is available in
HTML form for free on the web.

Python Practice Book is a book of Python exercises to help you learn the basic language
syntax.
Looking for ideas about what projects to use to learn to code? Check out this list of 5
programming projects for Python beginners .

There's a Udacity course by one of the creators of Reddit that shows how to use Python to
build a blog . It's a great introduction to web development concepts through coding.

I wrote a quick blog post on learning Python that non-technical folks trying to learn to
program may find useful.

Python for you and me is an approachable book with sections for Python syntax and the
major language constructs. The book also contains a short guide at the end to get
programmers to write their first Flask web application.

1k Views · View Upvoters

Upvote 4 Downvote

Recommended All

Karandeep Singh Johar, Platform Engineer at GoFynd (2017-present)


Answered Oct 30

I think it totally depends upon person to person how he want to learn things. For example I am
very impatient to read whole book or follow course to learn. I just learn what is needed like if i need
to parse a string I read a lot about how to do that in a best possible way, when i say best way I mean
optimised way. And this procedure can be little bit slow.

Points that must be confusing you:

Python 2.X or 3.X?

I have seen beginners are confused whether to start with python2.X and python3.X. You must not
think about that much and without any second thought just start with 3.X version. I terms of
understanding concepts of python there is hardly any difference in both the versions but yes huge
difference when we dig deeper. As you are a beginner i cannot explain technical differences at this
point just understand that if you wanna buy a mobile you will go for oneplus 5 not oneplus 1 (there
is no budget constrain).

Where I can find good course for it ?

There are ample amount of blogs vlogs present for python, you can follow that google will help you
out in that. I insist on reading Learning Python: Powerful Object-Oriented Programming: 5th
Edition this book, Its awesome and will clear most of your concepts.
OK, I have materials i have read the books now what?

Now you have read the books and you are getting bore dont know which direction to go. So what
you can do is

Start with practicing simple programs , questions can be found in geeksforgeeks or


hackerrank, hakerearth.

Start automation, you will love that. I used to automate every little thing that i can, I wrote
a script to book tatkal tickets from irctc. you can write script to get tweets or post
something on facebook. send email to someone 1000 times.

Work on real time project, doest matter it already developed or its a stupid idea, just start.
Develop simple task manager, calculator or alarm clock.

After following these things i am pretty sure you will be answering such questions :)

1.1k Views · View Upvoters · Answer requested by Ashish Arvind

Upvote 12 Downvote

Recommended All

Davis George, Ph.D | Researcher


Answered Oct 28

Originally Answered: Where can I learn Python from scratch?


Python is a widely used high-level programming language for general-purpose programming
language. Learning Python is really easy, a breeze if you've learned other object oriented
programming languages. ... It's recommended to be the first language people learn as it contains all
the concepts but is easier to read and less strongly typed as C++ or to a lesser extent Java.

There is no need to worry about learning python language it may be easy to learn python through
some online courses:

best python online courses:

The Python Bible™ | Everything You Need to Program in Python [BEST]

Become a Professional Python Programmer

choose the first course because it is widely used:

from this course you may learn about:

Build 11 Easy-to-Follow Python 3 Projects

Automate Coding Tasks By Building Custom Python Functions

Add Python 3 to your Resume by Understanding Object-Oriented Programming (OOP)

Use Variables to Track Data in Python Programs


Use Numbers to Create “Behind-the-Scenes” Functionality

Use Strings to Create Customized, Engaged User Experiences

Create Programs that can think using logic and data structures

Use Loops to Improve Efficiency, Save Time, Maximize Productivity

some other additional python online courses:

Complete Python Bootcamp: Go from zero to hero in Python

Complete Python Masterclass

suggested books for python:(for reference purpose only)

Python: Programming: Your Step By Step Guide To Easily Learn Python in 7 Days
(Python for Beginners, Python Programming for Beginners, Learn Python, Python
Language)

Automate the Boring Stuff with Python: Practical Programming for Total Beginners by Al
Sweigart

ALL THE BEST……

1.6k Views · View Upvoters

Upvote 2 Downvote

Recommended All

Pierre Corbin, Reporting Officer at Marsh


Answered Mar 14, 2017
Originally Answered: What is the best way to learn Python?

This depends on whether you already know how to program in another or you’re completely new to
it.

This answer is for newbies. Not sure this is the best way, but it’s the way I learned:

I did have a little coding experience before starting Python. I originally started with html, CSS and
JavaScript. The fact that I started with JavaScript really allowed me to easily grasp the abstract
concepts of programming. I didn’t have the level to do any complex programs in JavaScript, only
jQuery for creating dynamic websites.
I started Python by doing the course available on codec ademy. It is pretty long and gets around
the syntax and the main programming concepts of course. The problem after this, though, is that I
couldn’t really build anything by myself yet. I knew the syntax of Python, how to make loops, etc.
but was incapable of putting it all together to make something useful (I think most people go
through this phase when they start - coder’s block).

So I though I’d find tutorials online of programs other people wrote, explaining how to do it (one of
them was an online sushi bar game and the program was using the mouse to click where
necessary). This was a major breakthrough for me. Because this programming logic that is hard to
grasp was really shown to me in what back then seemed to be a BIG project for me.

From this point I did two things:

1. I came up with ideas on how to make parts of my daily tasks at work automatic and got
involved in bigger programming projects for my company.

2. I got a Raspberry Pi for my brother and we started building things - including a self-
driving car.

These two things allowed me to get the programming logic right.

After that, I moved on to some more advanced Python thanks to Treehouse (you do need to pay a
monthly fee for this - totally worth it if you can afford it in my opinion). Thanks to treehouse, I was
able to learn Django and create my own web app.

This last part is what has kept me busy for the past few months. Django is a Python framework that
was pretty hard for me to learn (and still learn) but this is what allows me to create the ideas I have.

Last but not least, I am now doing a course on Coursera called Applied Data Science in Python.
More advanced topic and quite a demanding course but I am learning a lot of theory on big data in
general as well as how to apply this professionally and in my personal projects (with Django).

I hope this helps. Ask questions in the comments if you need more details on a specific point :)

720 Views · View Upvoters

Upvote 1 Downvote

Recommended All

Kushagra Kumar, works at OYO


Answered Feb 16
Originally Answered: Where can I learn Python from scratch?

Answer to this question can vary little bit based on different contexts.

Do you have a programming background in any other language?

Upto what extent you want to learn python starting from scratch?

Why exactly you are going to learn python?

I will cover all these one by one

So ,if you have a good programming background in any other O.O language, believe me python is
damn easy for you.You can learn its basics within a week. I recommend you to learn from Python
official Doc directly.

If you want to start your carrier with python as first language : well you need to invest some time (a
month or more) to learn python ,along with what is a programming language and how it works.Go
through the following tutorials, in order(You can change the order if you like)

1. Udacity tutorial : Introduction to Python (beginner level)

2. Code Academy : Learn Python

3. Python official Doc

Official Doc of any language/technology is meant for reference purpose if you stuck some where, so
it will be little bit tough for beginners.

If you want to have a good grasp on python language(which I suggest) ,solve some simple
competitive programming questions (at least 50) from any online platform (hackerrank, codechef,
codeforces ,top coder etc) using python language .It will take around one month .

If you want to develop web applications ,


1. learn Django framework.

If you want to dive deeper in field of machine learning and data science

1. Pandas

2. Numpy

Healthy suggestions are always welcome.

Happy coding.

Image Source: Google

1k Views · View Upvoters

Upvote 32 Downvote

Recommended All

Scott Robinson, Node/Python programmer - tweets from @ScottWRobinson


Answered Dec 7, 2015

When I'm learning something new, like a new language or framework, there are a few approaches
you can take.

Option 1: A structured course

This is the fastest way to create something meaningful. There are tons of courses out there that
teach you how to create websites, apps, games, or tools with languages like Python. If your main
concern is to create something cool quickly, this is your best option.

Option 2: Self-taught

This is the slower, but much more effective, way of learning Python. If you want to really
understand the language, its idioms, tools, and community then this is the best way to go. You'll
learn far more about programming by exploring the documentation and writing the code yourself
and learning from trial-and-error. Choosing this method, however, may take you weeks or months
before you can create anything of value.

Option 3: A hybrid approach

Personally, I tend to choose a hybrid approach where I'll find a good tutorial and try to create the
final product on my own. When I get stuck, I'll read a bit more of the tutorial, but only after I can't
find or figure out the solution on my own. I think this is a good trade-off between really learning
the subject and being productive.

Hope this helps!

3.3k Views · View Upvoters

Upvote 26 Downvote

Recommended All

Radhakrishnan Ramesh, To iterate is human, to recurse divine


Updated Oct 3, 2016

Originally Answered: What is the best online resource to learn Python?

Thanks Azam for A2A

If you prefer to learn Python programming by watching videos

I do suggest to watch Corey Schafer youtube tutorials.I have watched a lot of videos on python
,beleive me this one is best for beginners

Link:Python Tutorials

If you would like to practise python interactively you can try Learn Python - Free Interactive
Python Tutorial
You could also try The Python Challenge

The Python Challenge is a set of riddles that require a little bit of Python programming to be
solved. The solutions are entered by changing the address of the page (URL). You get used to the
idea pretty fast after solving the first few levels.

I have listed other Popular tutorials below

Complexity of every tutorial and resource is marked as beginner, intermediate or


advanced level Python tutorials.

1. Code Academy – Interactive, Beginners ( The old version is discontinued, New


version will be released in Q1 2017) [1]

2. TutorialsPoint.com – Beginners, Online


3. Codementor.io – Advanced, For Experts, Online

4. PythonChallenge.com – Advanced, Interactive

5. Google’s Python Class – Free eBook, Intermediate

6. Python.org – Online, Beginners Python Tutorial

7. Learn Python the Hard Way – eBook, Beginners

8. LearnPython.org – Interactive Python Programming, Intermediate

9. Invent with Python – Free Book, Online

10. Dive into Python 3 – Beginners, Online

Happy learning Python!!

Cheers!

Source-Google

Footnotes
[1] Important Changes to Codecademy Courses

6.6k Views · View Upvoters · Answer requested by Azam Jm

Upvote 17 Downvote

Recommended All

Bhuvan m S, Made some games which use classical physics (vectors)


Answered May 31, 2014

Originally Answered: How do I learn Python efficiently?

Just Taking a 3 month course in MOOC like code academy, etc.. wont make you a software
developer or a good way to learn programming language .
In Order To Master a programming language.You Need to involve in projects.
start making some apps, games etc . Dont Just watch the videos from youtube.
Open Your IDE and start working .Dont Just Copy the Source code. Understand it and try to write
your own logic.

I always recommend Project Euler because it’s free and it presents some real challenges without
any guidance. You have to think logically on top of knowing syntax. You have to write efficient
code for many of them. Codecademy is the training wheels, Project Euler takes them off.

582 Views · View Upvoters

Upvote 4 Downvote

Recommended All

Guy Davidson, Software engineer, Python enthusiast, Minerva School student


Answered Apr 30, 2015

Originally Answered: How do I learn Python?

I'll rephrase and repost something I answered about "hacks for learning Python rapidly":

If you've learned a programming language before, start by re-doing an exercise you already did in
another language. Maybe it's implementing a simple ATM interface, Fahrenheit to Celsius
temperature converter, or tic-tac-toe game. That's usually an easy way to start, and allows you to
get the feel for differences between programming languages.

If Python is your first foray into programming, pick one of the many freely available online
resources. Try two or three at most, pick one, and commit to it.

When you run into issues (and you will), solve them yourself. Documentation is your friend. Google
is your friend. Experimentation (especially with Python's interpreter) is your friend. Stack overflow
is your friend, but only as a last resort, after exhausting what you can do to figure it out by yourself.

Have someone check your work. Find your favorite Python programmer, and ask them nicely (or
bribe them with a beer), to review your code. Listen to what they have to say, and keep their advice
in mind for your next assignment. Especially when it comes to things such as writing organized and
clean code, documentation, conventions, etc. - crucial skills for a programmer which I feel are very
hard to pick up from tutorials.

Once you've got a basic grasp of the language, find a small project that interests you, and
implement it. Want to write a website? Awesome, Django or Flask might be perfect for you.
Studying math, physics, or engineering? Surely something in SciPy or NumPy could be useful. Find
something you really want done, and go do it.

2k Views · View Upvoters

Upvote 9 Downvote
Recommended All

Thyag Sundaramoorthy, Python and Java programmer


Answered Jul 23, 2013

Originally Answered: Which way is better to learn Python?

A great "second" book for Python enthusiasts is the Python Cookbook , 4th Edition by David
Beazley, Brian K. Jones . It has an awesome collection of recipes, most of which can be read or
practiced independently .
Note: you might want to consider the 3rd edition by Alex Martelli if your projects depend on
Python 2.x

And if you know the basics of Python, then (in the words of Allen Downey), you can use this
knowledge to learn or experiment with other technical / scientific concepts, such as :
Machine learning : Programming Collective Intelligence: Building Smart Web 2.0
Applications: Toby Segaran:

Statistics : Think Stats - Probability and Statistics for Programmers - by Allen Downey

Data Analysis : Python for Data Analysis : Wes McKinney:

Cryptography : Hacking Secret Ciphers with Python by Al Sweigart


Reading portions of these books made my Python journey a little more interesting. Oftentimes, it is
better to have a "build stuff" and "solve problems" mindset compared to "write code" mindset.
Have fun with Python.

1.6k Views · View Upvoters

Upvote 4 Downvote

Recommended All

Collabera TACT, Training Provider on Emerging Technologies


Answered Dec 5

You can contact us at yugrajsinh@collaberatact.com

Definitely Python has a evident future ..

Python is a general-purpose language, which means it can be used to build just about anything,
which will be made easy with the right tools/libraries.
Professionally, Python is great for backend web development, data analysis, artificial intelligence,
and scientific computing. Many developers have also used Python to build productivity tools,
games, and desktop apps, so there are plenty of resources to help you learn how to do those as well.

Beginner Friendliness

Python was designed to be easy to understand and fun to use (its name came from Monty Python
so a lot of its beginner tutorials reference it). Fun is a great motivator, and since you'll be able to
build prototypes and tools quickly with Python, many find coding in Python a satisfying experience.
Thus, Python has gained popularity for being a beginner-friendly language, and it has replaced
Java as the most popular introductory language at Top U.S. Universities.

Easy to Understand

Being a very high level language, Python reads like English, which takes a lot of syntax-learning
stress off coding beginners. Python handles a lot of complexity for you, so it is very beginner-
friendly in that it allows beginners to focus on learning programming concepts and not have to
worry about too much details.

Very Flexible

As a dynamically typed language, Python is really flexible. This means there are no hard rules on
how to build features, and you'll have more flexibility solving problems using different methods
(though the Python philosophy encourages using the obvious way to solve things). Furthermore,
Python is also more forgiving of errors, so you'll still be able to compile and run your program until
you hit the problematic part.

Scalability

Not Easy to Maintain

Because Python is a dynamically typed language, the same thing can easily mean something
different depending on the context. As a Python app grows larger and more complex, this may get
difficult to maintain as errors will become difficult to track down and fix, so it will take experience
and insight to know how to design your code or write unit tests to ease maintainability.

Slow

As a dynamically typed language, Python is slow because it is too flexible and the machine would
need to do a lot of referencing to make sure what the definition of something is, and this slows
Python performance down.
At any rate, there are alternatives such as PyPy that are faster implementations of Python. While
they might still not be as fast as Java, for example, it certainly improves the speed greatly.

Community

As you step into the programming world, you'll soon understand how vital support is, as the
developer community is all about giving and receiving help. The larger a community, the more
likely you'd get help and the more people will be building useful tools to ease the process of
development.

5th Largest StackOverflow Community

StackOverflow is a programming Q&A site you will no doubt become intimate with as a coding
beginner. Python has 85.9k followers, with over 500k Python questions. Python questions are also
the 3rd most likely to be answered when compared to other popular programming languages.

3rd Largest Meetup Community

At meetups, you can generally network and learn from fellow developers. Meetups often offer
mentorship to those who want it as well. There are 1300+ Python groups on We are what we do |
Meetup , totaling 608k+ members. Thus, in terms of programming languages, Python is the 3rd
largest community.

4th Most-Used Language at GitHub

The more useful projects there are, the more likely someone has already built a function you need
and built it well, which will greatly speed up your development process.Over 950 Python projects
have over 500 stars.

Python is also known to have an abundance of libraries that assist with data analysis and scientific
computing. In addition, PyGames is a neat game engine to build games with if you want to make
simple games.

Career Opportunities

Salary information

On Angel List, Python is the 2nd most demanded skill and also the skill with the highest average
salary offered.

With the rise of big data, Python developers are in demand as data scientists, especially since
Python can be easily integrated into web applications to carry out tasks that require machine
learning.

Future

According to the TIOBE index, Python is the 4th most popular programming language out of 100

With the rise of Ruby on Rails and more recently Node.js, Python's usage as the main prototyping
language for backend web development has diminished somewhat, especially since it has a
fragmented MVC ecosystem. However, with big data becoming more and more important, Python
has become a skill that is more in demand than ever, especially it can be integrated into web
applications.

As an open source project, Python is actively worked on with a moderate update cycle, pushing out
new versions every year or so to make sure it remains relevant.

A programming language's ability to stay relevant also depends on whether the language is getting
new blood. In terms of search volume for anyone interested in learning Python, it has skyrocketed
to the 1st place when compared to other languages.

Interest in learning Python grew by 22.1% in 2015

Clearly, Python will continue to reign in terms of relevance, and has a pretty good future thanks to
its large community.

Contact us at yugrajsinh@collaberatact.com or 7227 048673

905 Views · View Upvoters

Upvote 1 Downvote

Recommended All

Anonymous
Answered Dec 28, 2014

Originally Answered: How do I learn Python?

Dive right into it.

Cut out the what books what websites everything.

Do you know any other languages?


I shall assume Yes. So start just the way you started with that.

Write a simple hello world.

Look up the data types (Python has lists,tuples,dicts which could be something new)

Learn how arithmetics are performed

See how functions/methods are created. Pass parameters around

Create a calculator (nested if-else nothing fancy)

Create a class. Learn how objects work

Did you ever do competitive programming? Yes? Try out the simple questions in python.
No? Try out the simple questions in python

Try recreating things you did in your other languages using python. If you're sitting idle
wanting to learn python why not do this if you don't have anything else to do

Everytime you get stuck or don't know how to do it.. just google "<your doubt> stackoverflow", I
assure you would definitely find something helpful otherwise you have us here on Quora

Just dive right in. Take the first step.

A few helpful links:


Python
Learn Python
The Python Challenge
The Python Tutorial
Python tutorial
Learn Python - Free Interactive Python Tutorial

Good Luck!

519 Views · View Upvoters

Upvote 5 Downvote

Recommended All

Rahul Dwivedi, In love with this language


Answered Feb 20, 2016
Originally Answered: How do I Start learning Python and write scripts as Ashish Kedia?

Here i present Top 101 ways to write python scripts a like Ashish kedia or any other badass
programmer.

.........

..........

oops . i forgot to say ,"THERE ARE NOT ".

Sadly for programming there is no cookbook which states that if you do these steps in certain
order, you are really going to be great programmer. But what you can do that is going to help you is
stop asking the questions and really START LEARNING PYTHON. There are already a hundred's
of questions demanding the same answer as you are. What you need to do is get started as fast as
you can.

1.How to Learn Python

A question like yours ,100+ answers, find that suits you the best : How should I start
learning Python? But more important is to actually implement any one of the answer,

WRITE SOMETHING , first step is of course to write down something, anything, just
open terminal write a simple "hello world" program, write your name , i know when i
started learning, for two days i was just writing down name of person that i know and i
was happy as i was making the computer to do something for me . Just go right now ,
and write

print "I have started Learning and i will do my best "

Don't Look back now, once you start just keep going on try to program anything that you
have done till now add,subtract,square root, taking input giving outputs....etc.

2.How to write down Scripts:

Scripts sounds interesting but python scripts are basically programs designed to carry out
some special functionality like scraping a webpage,creating a webcrawler, a lot of
automation task. how to write one? THINK ABOUT ONE. Most of scripts are written to
tackle a real life problems When i wrote my first i was having a problem of file chaos, all of
my files were scattered and it was not pleasing to look at them so instead of asking a
question of quora, i started writing down solution and within hours it was complete, i had
made something useful, something that was producing some outputs that i care about.
look at these answers and all those programmers created a script,a solution that helped
them to achieve something What are the best Python scripts you've ever written? answers
include writing cricket notification scripts , facebooks scripts even if you go through
Ashish kedia scripts they were written to achieve something, Something that matters.

but i wouldn't say go through answers and try to implement them one by one. NO!!! find
something that matters to you something that will make you happy ,
be innovative, be creative then not only you would enjoy writing them but you will
gain MUCH MUCH more experience.said all that, to achieve upto this point you really
have to do so many things and you know the first step "WRITE SOMETHING".

Remember Three P's for programming, PRACTICE, PATIENCE, PERSISTENCE. you are not going
to be better programmer after reading this answer but you are definitely going to be if you write
something. Remember, it will take a long time to become success.

15.6k Views · View Upvoters

Upvote 135 Downvote

Recommended All

Saqib Shamsi, 2+ years of programming experience in Python


Answered Nov 4, 2014

Originally Answered: How can I learn the Python programming language within 3 weeks?

A period of 3 weeks is sufficient to get a grasp of the basics of Python. This is because it is an easy
programming language to understand and work on.
Now, I learned Python from a course on Coursera called "An Introduction to Interactive
Programming in Python" by Rice University.
Here's the link to the page:
Coursera
They'll be offering another session of the course soon. Though the course is officially for a period of
two months, if you can get the videos from the archive or from a friend, you'll find that the entire
course can easily be covered in a span of three weeks.
Also, you can have a look at the following course too:
Coursera
Now, if you want a self paced course, following links could be helpful:
Intro to Python Programming Course
Intro to Computer Science

As mentioned by Ashesh Kumar above, Learn to code is also a good source.


These courses are good because you learn a skill by doing it, which is very essential when learning
to program in a particular language. Otherwise, you could also watch the videos
by thenewboston . I learned C++ from his tutorials and they were very good. I can't say the same
about the Python tutorials, but you can give it a try. Here' the link to the same:
Python Programming Tutorial - 1 - Installing Python

591 Views · View Upvoters

Upvote 3 Downvote

Recommended All

Chitra Sweety
Answered Nov 4

Originally Answered: What is the best way to learn Python fast?


you can learn python through some online courses, I will suggest you the best online courses…

Best python online courses:

The Python Bible™ | Everything You Need to Program in Python [BEST]

FROM THIS COURSE YOU MAY LEARN ABOUT:

Variables - Learn to conveniently store data in your programs!

Numbers - Learn how numbers work behind the scenes in your programs!

Strings - Master Python Text and automate messages using Strings!

Logic and Data structures - Teach your program to think and decide!

Loops - Save time and effort, by making computers do the hard work for you!

Functions - Automate Tasks by Building your very own Python Functions that you can use over and
over!

OOP - Add Python to Your Resumé By Mastering Object Oriented Programming, the industry
programming standard!

So whether you want to get into Data Science, Web Development or make cool robots with the
Raspberry Pi, The Python Bible gives you everything you need to get started on your path!
AND ALSO..

Build 11 Easy-to-Follow Python 3 Projects

Automate Coding Tasks By Building Custom Python Functions

Add Python 3 to your Resume by Understanding Object-Oriented Programming (OOP)

Use Variables to Track Data in Python Programs

Use Numbers to Create “Behind-the-Scenes” Functionality

Use Strings to Create Customized, Engaged User Experiences

Create Programs that can think using logic and data structures

Use Loops to Improve Efficiency, Save Time, Maximize Productivity

SOME MORE ADDITIONAL PYTHON ONLINE COURSES:

Complete Python Bootcamp: Go from zero to hero in Python

Complete Python Masterclass

TEXTBOOKS SUGGESTED FOR PYTHON(FOR REFERENCE PURPOSE ONLY)

Learning Python by Mark Lutz

Python Crash Course: A Hands-On, Project-Based Introduction to


Programming by Eric Matthes

Python: For Beginners: A Crash Course Guide To Learn Python in 1 Week by


Timothy C. Needham

all the best…..

610 Views · View Upvoters

Upvote 1 Downvote

Recommended All

Jeremy Schwartz, former Bootcamp Founder, Instructor at GoCode (2014-


2016)
Answered Oct 16, 2014
Originally Answered: How can I start learning Python?
Disclaimer: I am co-founder and lead instructor for GoCodeNow (Learn To Code In Paradise )
where we teach Python in 8 weeks in Costa Rica.

So your options are as follows.

1) On your own using online courses and books.


2) An immersive bootcamps.

Online: Coursera
Books: O'Reilly's Python Book
Also second Learn Python

Bootcamps: You check out my other site Programming bootcamp reviews, learn to code, learn
programming to look to research bootcamps.

There are trade-offs to both. On your own will probably be harder, just because you don't always
have an a person around to help you get unstuck. The upside is it really forces you to learn
everything. The other issue is it requires a good amount of discipline to stick with it.

A bootcamp tries to solve these issues. The downside is for many people the cost, and the ability to
devote that much amount of time.

If you can manage a bootcamp I recommend it because it forces you into an environment for a
focused intense time. You can accomplish a lot if in an immersive environment.

Either way, the only way to really code is by coding - a lot. So give yourself a bunch of projects and
work on them.

1.2k Views · View Upvoters

Upvote 2 Downvote

Recommended All

Rohit Jaiswal, System Analyst at AtoS


Answered Mar 27, 2017

Originally Answered: What is the best and fastest way to learn Python?

This question comes a lot and seems like people do not get proper help to start with.
Python as a language is not very strict and allows one customizing things as per the need. You can
start on your own by installing the python(would recommend to start with python 2.6)
from Python Releases for Windows and start the python interpreter and type by first simple
program oh yeah…you know it “ Hello World”

Here you can get started with, in two ways.

print "hello Python". Yes it is that simple.

You can also save this line in file with .py extension and run from command prompt python
firstprogarm.py

You can go through the python coursera course and there are some online tutorials that have good
sets problems to be solved like hackerearth, git(for active contribution towards live projects being
developed in python), codechef, learn python hardway etc.

You can also have a look at one of my posts What are the ways for a Python programmer to find the
best relevant company to work with?

Feel free in-case of doubts/queries.

601 Views · View Upvoters

Upvote 4 Downvote

Herb Martin
I have had good luck with Coursera as well (Programming Languages parts A, B, C in SML, Racket, a...

Raviteja Chirala, Data Scientist, Avid Programmer..


Answered Mar 25, 2015

Originally Answered: What's the most efficient way to learn Python?

Practice
It might sound routine and boring but it's the only way you get better. There are many
online tutorials but one I like is Python online class in YouTube. You can follow it to get
started. I have started in similar way and it's extremely useful but its just a beginner. Once
you know basic here on you have to pick.

Pick your favorite algorithms or any algorithms you're familiar with and convert them into
Python code. Pick any Data Structures book and work on different types of data structures
and see how you can implement them in Python. Python has an interesting way to treat
with different Data Structures.

Get yourself familiar with Python standard libraries like Django, Requests, SciPy etc

There is a lot of choices for IDE's here. Perhaps PyCharm or Anaconda (Python
distribution) is a good choice. Anaconda comes with iPython console and Spyder too(In
built IDE's)

Once again do not leave practice. More you write more you will learn.

ATB

7.9k Views · View Upvoters

Upvote 11 Downvote

Recommended All

Mohan Mohan
Answered Dec 13
Originally Answered: How do I start to learn Python?

1. Simple Elegant Syntax

Programming in Python is fun. It's easier to understand and write Python code. Why?The
syntax feels natural. Take this source code for an example:a = 2 b = 3 sum = a + b
print(sum)
Even if you have never programmed before, you can easily guess that this program adds
two numbers and prints it.

2. Not overly strict

You don't need to define the type of a variable in Python. Also, it's not necessary to add
semicolon at the end of the statement.

Python enforces you to follow good practices (like proper indentation). These small things
can make learning much easier for beginners.

3. Expressiveness of the language

Python allows you to write programs having greater functionality with fewer lines of code.
Here's a link to the source code of Tic-tac-toe game with a graphical interface and a smart
computer opponent in less than 500 lines of code. This is just an example. You will be
amazed how much you can do with Python once you learn the basics.

4. Great Community and Support

Python has a large supporting community. There are numerous active forums online
which can be handy if you are stuck. Some of them are:Learn Python sub reddit Google
Forum for Python Python Questions - Stack Overflow

Run Python on Your Operating System

You will find the easiest way to run Python on your computer (Windows, Mac OS X or Linux) in
this section.

Install and Run Python in Mac OS X

Install and Run Python in Linux (Ubuntu)

Install and Run Python in Windows


1. Go to Download Python page on the official site and click Download Python 3.6.0 (You
may see different version name).

2. When the download is completed, double-click the file and follow the instructions to
install it.
When Python is installed, a program called IDLE is also installed along with it. It provides
graphical user interface to work with Python.

3. Open IDLE, copy the following code below and press enter.print("Hello, World!")

4. To create a file in IDLE, go to File > New Window (Shortcut: Ctrl+N).

5. Write Python code (you can copy the code below for now) and save (Shortcut: Ctrl+S)
with .py file extension like: http://hello.py or http://your-first-
program.py print("Hello, World!")

6. Go to Run > Run module (Shortcut: F5) and you can see the output. Congratulations,
you've successfully run your first Python program.

Your First Python Program

Often, a program called "Hello, World!" is used to introduce a new programming language to
beginners. A "Hello, World!" is a simple program that outputs "Hello, World!".

However, Python is one of the easiest language to learn, and creating "Hello, World!" program is as
simple as writing print("Hello, World!"). So, we are going to write a different program.

Program to Add Two Numbers

# Add two numbers

num1 = 3

num2 = 5

sum = num1+num2

print(sum)

Run

How this program works?

Line 1: # Add two numbers


Any line starting with # in Python programming is a comment.

Comments are used in programming to describe the purpose of the code. This helps you as well as
other programmers to understand the intent of the code. Comments are completely ignored by
compilers and interpreters.

Line 2: num1 = 3

Here,

num1

is a variable. You can store a value in a variable. Here, 3 is stored in this variable.

Line 3: num2 = 5

Similarly, 5 is stored in

num2

variable.

Line 4: sum = num1+num2

The variables

num1

and

num2

are added using + operator. The result of addition is then stored in another variable

sum

Line 5: print(sum)

The print() function prints the output to the screen. In our case, it prints 8 on the screen.

Few Important Things to Remember

To represent a statement in Python, newline (enter) is used. The use of semicolon at the end of the
statement is optional (unlike languages like C/C++, JavaScript, PHP). In fact, it's recommended to
omit semicolon at the end of the statement in Python.

Instead of curly braces { }, indentations are used to represent a block.

im_a_parent:
im_a_child:
im_a_grand_child
im_another_child:
im_another_grand_child

Learn Python from Programiz

Programiz offers dozens of Python tutorials and examples to help you learn Python programming
from scratch.

Our tutorials are designed for beginners who do not have any prior knowledge of Python (or, any
other programming languages). Each tutorial is written in depth with examples and detailed
explanation.

We also encourage you to try our examples and run it. Once you understand the program, modify it
and try to create something new. This is the best way to learn programming.

More here: Zikrabyte Blog - Incredibly Innovative

189 Views · View Upvoters

Upvote 1 Downvote

Recommended All

Vijaya Lakshmi, Software Test Engineer at Wipro (2014-present)


Answered Jun 25, 2017

How to Learn Python?

In Which sequence should We learn Python?

Python is a General Purpose, Interpreter based, and Object-oriented Programming


Language.

Python is used for,

i. Web and Internet Development


ii. Scientific and Numeric
iii. Education
iv. Desktop GUIs
v. Software Development
Python is often used as a support language for software developers,

First Focus on Python Environment Setup (Download and Install Python...)

1) Python Language Fundamentals


i) Comments in Python
ii) Data Types
iii) Variables
iv) Operators
v) Conditional Statements
b) Loop Statements
c) Branching Statements
vi) Data structures: Lists, Tuples, Sets, Dictionaries...
vii) Functions
viii) Modules

2) Object Oriented Programming


i) Class & Method...
ii) Constructor and Destructor
iii) Inheritance
iv) Polymorphism
vi) Data Abstraction
vii) Encapsulation

3) String Handling
4) Exception Handling
5) Regular Expressions
6) Python IO Operations and File handling
7) Working with Databases
8) Multi Threading
9) Networking Programming
10) CGI (Common Gateway Interface) Programming
10) GUI Programming Etc...
--------------------------------------------
Note:
You take any Computer programming language like C, C+, Java, Perl, Python, 80% concepts are
same for example, Variables, Data Types, Operators, Conditional statements, Loop Statements.,
functions are common in every programming language, syntax may vary from one language to
another.

Some concepts may vary from one language to another for example In C Language (Structured
programming) we have Functions but no Methods, In Java language (Object Oriented
programming) we have methods, and Functions in C are equivalent to Methods in Java.)

Also Read:

1) Introduction to Python

2) Download & Install Python

Python Step by Step Videos - YouTube

185 Views · View Upvoters

Upvote 3 Downvote

Recommended All

Tom Bath, Student of Python


Answered Jan 10, 2014

Originally Answered: What is the best way to learn Python language?

Since you are not only familiar with C, but programming in general, I would skip anything that
teaches you about programming at the same time as Python. This is most Python courses since it is
often used as a beginners language due to the natural syntax and ease of readability. All of the
sources below are free.

I would go in this order:

1. C for Python Programmers and Crash into Python


The first one here is actually written backwards for you but you will get the point. You will be still
be able to compare the two languages side-by-side. Though the writing will be for going from
Python to C, it is having this reference between the two that is important. It matters less how the
article is written. The frame of reference between what you know now and what you are trying to
learn will help accelerate the process.
The second one is written for anybody coming for another language in general.

2. Learn python in Y Minutes


Like the sources above, you can probably breeze through this in a short amount of time. The
difference here is that it will not really reference other languages. However it will give you some
more depth and it will do so quicker. Many brief examples.

Some people might skip these first two steps but I think you would save a lot of time going through
these first. A little bit of effort up front will save you a lot of time in the end.

3. Learn to code (codeacademy) or Page on Learnpythonthehardway (learn python the hard


way).
Both of these are great resources since they won't spend much time on theory. They are filled with
exercises. Perhaps codeacademy first. Learn python the hardway is great because it is also filled
with a bunch of charts and tables which are helpful, especially to a person with programming
experience who simply wants to get their head around the language. The two exercises below are
good examples of chapters with summaries of features:

Page on Learnpythonthehardway - ex. 27


Page on Learnpythonthehardway - ex. 37

...and this next one is an example of a sample of a chapter with some basic exercises you will
encounter in most of the other chapters in the book.

Page on Learnpythonthehardway - ex. 30

4. List of Videos for Python .(Optional)


I learn by doing so the first three options were best for me. If you are somebody who can learn
quickly by watching lectures, you can check out the new boston's python videos. The exercises
Bucky (the instructor) does are pretty basic and you can follow along if you want so you get lectures
as well as practice.
If you do this option I would skip step 3 for now and come back to it later.

There are many other sources but I think most of them will be a waste of time. You will get bored
learning about what programming is, which you already know.

If you insist on this route though (perhaps you like the academic way of thinking), try out Udacity's
CS101 course - Intro to Computer Science Class Online (CS101) . It's pretty good and the last class
session has been completed already so you can go through the whole thing in a short amount of
time.

2.3k Views · View Upvoters

Upvote 5 Downvote

Recommended All

Jhan Denny, M.S from Stanford University


Answered Jul 6, 2017

Originally Answered: Where should I start learning Python?

Python is Best Programming Language in the world . and this is also used in Data Science ,
Machine Learning , AI etc….
In This Python you have some easy concepts and you can complete python with in 30 days also ,

K any way i will suggest you

Best Python Online Learning Courses

1. 30 Days of Python | Unlock your Python Potential

2. Become a Professional Python Programmer

3. Complete Python Masterclass

4. Fast Track Python for Newbies

5. The Complete Python 3 Course: Go from Beginner to Advanced!

6. The Python Bible™ | Everything You Need to Program in Python

Practice with More & more examples and i recommend to you just participate in Top-coder/Code-
chef/Hackerank & Some Online Forums/Communities to get Perfection .

Anyway All the Best .

Keep Practicing.

276 Views · View Upvoters

Upvote 6 Downvote

Recommended All

Tanuj Mishra, Dreamer | Known as @thetanuj on Internet | www.lisplay.com


Updated May 7, 2016

Originally Answered: How can I learn about python on my own?

Start with python course on Codecademy - Learn to code

Finish the course as fast as possible. It's easy and fun.

Then finish this book Learn Python The Hard Way

Do not watch videos. Just the book.

Now you know what to do. Let me tell you how to do it.
Finish these two tutorials within two weeks. You can take more than two weeks but you'll
start losing motivation and fun. If you finish these in less than two weeks, it will give a
massive confidence in yourself which is even more important than hard work itself
(especially for beginners).

Do NOT take any video tutorial. No, there is nothing wrong with videos. Its just they are
not very productive. Watch them later to hone your skills. Also, most of the materials that
will help you in learning will be in text format. So, its better to train yourself to learn by
reading, not watching.

Once you have completed these courses, trust me, you know enough python to start building
something. This is most important - build something. It can be anything. A basic website, a small
software or anything you want. Where to start? Google.

In my opinion, most fun thing in python to do is to write scripts to automate things. It's easy, fun
and big confidence booster. Think about what you would like to automate. You can find a lot of
brilliant scripts that people have written on Quora. Find them, run them and edit to make it do
more.

Some great examples here: What are the best Python scripts you've ever written?

Here is script that I wrote after learning python for few weeks: One click order on Amazon (India)
using Raspberry Pi (let me know if it still works... haven't tested it in a while)

And here's an amazing article to make you think out of the box: A programmer wrote scripts to
secretly automate a lot of his job - and email his wife and make a latte

TWO WEEKS LATER:

I forgot to mention one more wonderful website to learn python. Runestone Interactive Python
- Table of Contents

Take one more week and go through it. Read the theory and complete all exercises. Don't skip
anything, even if you don't understand it. And if you decide to skip, come back to it later.

515 Views · View Upvoters

Upvote 7 Downvote

Shruti Shamdasani
Hey great answer! Can you provide me more links regarding automating things using python
Shivam Yadav, Instrumentation and Control Engineering, Batch of 2019
Answered Aug 14, 2016

I have been learning python. I found these resources helpful -

1. Learn Python The Hard Way - It’s a very beginner friendly online tutorial which will get
you up and running in python very quickly. You can move to different python tutorials
after this.

2. Intro to Computer Science | Udacity - You can take this course after/alongside LPTHW.
Its also beginner friendly and will teach the concepts of programming and computer
science more deeply. You will build your own search engine using python as the final
project.

After this, Its up to you what you want to do with python and learn accordingly.

Other Resources -

Codecademy Python

Google's Python Class

Learn Python Through Public Data Hacking

Good luck!

287 Views · View Upvoters

Upvote 4 Downvote

Recommended All
Sachin Mathur, Big Data Analyst at Cognizant since 2012
Answered Feb 12, 2016
Originally Answered: What is the best online resource to learn Python?

Python is a high level, multipurpose, interpreted, interactive and object oriented programming
language. Python is easy to learn and versatile scripting language Python is a programming
language which supports structured and functional methods and that have build in data structure,
Portable, I Have Better Resource For You You Can Visit This Link-:Online Python
programming Training and tutorial Many of the examples in this manual, even tho Extensible.
Also it is an extensible language.

Interpreted means it is processed at run-time by using interpreter. There is no need to compile


program before execution. It is used to give the capability to interact to databases, to build the
applications which can be run in a Windows environment, to build the CGI scripts which can be
run from a Web browser etc. It is used in everywhere from business Web sites to online games,
from simple conversion scripts to complex Internet update routines for banks and other financial
institutions.

Python is a programming language that can be applied in many different platforms. It comes with
standard library that includes almost for all Internet protocols, OS interfaces, testing and string
processing.

String Processing – Regular Expressions, Calculate differences between files, Unicode.

Internet Protocols – HTTP, SMTP, FTP, XML-RPC, IMAP, POP, CGI programming

Software Engineering – Unit Testing, Logging, Profiling and Parsing Python code

Operating System Interfaces – System Calls, File Systems and TCP/IP Sockets

Unlike other programming languages,

Few lines of codes does the super job

There is no need for curly brackets but requires proper indentation.

Variable data type declaration not required python will handle it.

Python codes need not have classes, you can get the functionalities working just by
declaring them in functions or methods. Create modules and import it to reuse the code.

It is used to support the limited form of multiple inheritance which is very easy to learn.

It supports most of the Oops concepts that other programming languages do.
It provides built in functions that are easy to adapt and work.

Features of Python

Python has following Features –

Object-Oriented

Free

Portable

Powerful

Salable

Mixable

Easy to Use

Easy to learn

Stable

GUI Programming

entered at the interactive prompt, include comments. Comments in Python start with the hash
character, #, and extend to the end of the physical line. A comment may appear at the start of a line
or following white space or code, but not within a string literal. A hash character within a string
literal is just a hash character. Since comments are to clarify code and are not interpreted by
Python, they may be omitted when typing in examples.

Some examples:

# this is the first comment spam = 1 # and this is the second comment # ... and now a third! text =
"# This is not a comment because it's inside quotes."

Using Python as a Calculator

Let’s try some simple Python commands. Start the interpreter and wait for the primary prompt,
>>>. (It shouldn’t take long.)

The interpreter acts as a simple calculator: you can type an expression at it and it will write the
value. Expression syntax is straightforward: the operators+, -, * and / work just like in most other
languages (for example, Pascal or C); parentheses (()) can be used for grouping. For example:

>>> 2 + 2 4 >>> 50 - 5*6 20 >>> (50 - 5.0*6) / 4 5.0 >>> 8 / 5.0 1.6
The integer numbers (e.g. 2, 4, 20) have type int the ones with a fractional part (e.g. 5.0, 1.6) have
type Float We will see more about numeric types later in the tutorial.

The return type of a division (/) operation depends on its operands. If both operands are of type int
, floor is performed and an Int is returned. If either operand is a Float , classic division is
performed and a float is returned. The // operator is also provided for doing floor division no
matter what the operands are. The remainder can be calculated with the % operator:

>>> 17 / 3 # int / int -> int 5 >>> 17 / 3.0 # int / float -> float 5.666666666666667 >>> 17 // 3.0 #
explicit floor division discards the fractional part 5.0 >>> 17 % 3 # the % operator returns the
remainder of the division 2 >>> 5 * 3 + 2 # result * divisor + remainder 17

With Python, it is possible to use the ** operator to calculate powers

>>> 5 ** 2 # 5 squared 25 >>> 2 ** 7 # 2 to the power of 7 128

The equal sign (=) is used to assign a value to a variable. Afterwards, no result is displayed before
the next interactive prompt:

>>> width = 20 >>> height = 5 * 9 >>> width * height 900

If a variable is not “defined” (assigned a value), trying to use it will give you an error:

>>> n # try to access an undefined variable Traceback (most recent call last): File "", line 1, in
NameError: name 'n' is not defined

There is full support for floating point; operators with mixed type operands convert the integer
operand to floating point:

>>> 3 * 3.75 / 1.5 7.5 >>> 7.0 / 2 3.5

In interactive mode, the last printed expression is assigned to the variable _. This means that when
you are using Python as a desk calculator, it is somewhat easier to continue calculations, for
example:

>>> tax = 12.5 / 100 >>> price = 100.50 >>> price * tax 12.5625 >>> price + _ 113.0625 >>>
round(_, 2) 113.06

This variable should be treated as read-only by the user. Don’t explicitly assign a value to it — you
would create an independent local variable with the same name masking the built-in variable with
its magic behavior.

2.6k Views · View Upvoters


Upvote 7 Downvote

Recommended All

Rod Dylan, studied at University of Cambridge


Answered May 22, 2017

Originally Answered: What is the best online resource to learn Python from scratch?

The manual. It can be found at 3.6.1 Documentation , for the most recent version.

For gently learning the basics with no prior programming knowledge, codecademy is a nice
introduction for younger learners. For anybody 16+ (or any smart teen a bit younger) an
introductory computer science MOOC that uses Python such as Introduction to Computer Science
and Programming Using Python (the redundancy in that sentence is thanks to their naming the
course what I would have) may be better. Ignore the 15 hours effort over a period of 9 weeks for
that course if you have any previous programming experience, but by the same token it ignores
many features of Python not needed to teach the CS relevant to that course.

But seriously, read the fine manual online. Google is your friend whenever you come across an
error message you don’t understand. The best resource for learning Python is actually writing
programs in it, which can be done offline.

266 Views · View Upvoters

Upvote 2 Downvote

Recommended All

Christian Mayer, PhD student CS, creates code puzzles @Finxter.com


Updated Sep 7

Answer Wiki ++ (it is not possible to modify the Wiki on this page):

DataCamp Intro to Python for Data Science - Intro to Python for Data Science

Learn Python for Data Science - Dataquest

Collection of 53 Free Python books - Python Programming Books [ click free. ] .


Includes all the books mentioned below.

Python: Learn Python in One Day and Learn It Well

Codecademy: Python
Code puzzles: Finxter

Python Step by Step: Build a Data Analysis Program (Disclosure: Added by author)

Learning Python, 5th Edition

Learn Python The Hardway (http://learnpythonthehardway.org/ )

Python: The Essential Reference (http://www.informit.com/store/pr... )

How to Think like a Computer Scientist (http://greenteapress.com/thinkpy... )

Learning Python - 4th Edition (http://www.rmi.net/~lutz/about-l... )

Byte of Python (http://www.swaroopch.org/notes/P... )

Beginning Python (http://www.apress.com/9781590599822 )

The Python Standard Library by example (The Python Standard Library By Example )

Python in a nutshell (http://shop.oreilly.com/product/... )

Head First Python Core Python Programming (http://corepython.com/ )

MIT's introductory course (Introduction to Computer Science and Programming )

Google for Education Python course: Google's Python Class

Automate the Boring Stuff with Python: Practical Programming for Total Beginners

Data Science from Scratch: First Principles with Python

Learning to Program Using Python, 2nd Edition

JavaTpoint is the best resources to learn Online Python Tutorial for beginners .

Crowdsourcing: Topcoder

Official documentation: Python programming language

Official tutorial: The Official Python Tutorial

Tutorial Python and CS: How To Think Like A Computer Scientist

Tutorial Python for beginner: Dive Into Python

Tutorial with interpreter: TryPython

Tutorial with interpreter (more basic): LearnPython

Python Tutorial: Python Training by Dan Bader – dbader.org


Python course: Tim Buchalka at Udemy

Udacity: introduction to computer science

Udemy courses: 200 Most Popular Online Courses All Time

Coursera: Python for Everyone

Ocw : introduction to computer science and programming

Head First Python (recommended if you are new to Python and programming)

Learn Python the Hard Way: A Very Simple Introduction to the Terrifyingly Beautiful
World of Computers and Code

Python Cookbook

Learning Python: Powerful Object-Oriented Programming

Fluent Python

Effective Python 1: 59 Specific Ways to Write Better Python

Expert Python Programming

If you have more suggestions, please add them as comments — so that I can include them regularly.

360 Views

Upvote Downvote

Recommended All

Mark McCartin-Lim
Answered Dec 30, 2014

Originally Answered: How do I learn Python?

The first thing you will want is a good IDE or editor that has good Python support. The IDLE
editor, which is default for many Python installations, is not very good. Maybe check out Wing.
They have a free student version.

Python unlike many other programming languages uses indentation as part of its actual syntax, so
that's why it's very essential to have a good Python editor. In a plain text editor, you'll run into
trouble if tabs get mixed with spaces, and could run into even more trouble if you start copying and
pasting code snippets with different indentation schemes.
Python also has an interactive mode, which you should take advantage of while learning. With
compiled languages like C++ or Java, you need to recompile your code again and again, to test
every change you make. With Python, you can quickly test things in the interactive interpreter. If
you're not sure how to use a particular library function or language feature, it's often quicker to
take a guess and test it out than to look up the official documentation. Python is a very intuitive
language with consistent semantics, so you may find your guesses are often right. Don't be afraid to
experiment.

The interactive interpreter also speeds up the process of testing your own code for bugs, which is
something you should get in the habit of doing quite frequently. Many of the features that make
Python easy to use also make it easy to introduce bugs, especially if you're a novice.

Dogmatic languages like Java force you to adopt a very rigid set of programming practices, with the
intention of reducing bugs, but also requiring you to write a lot of boiler plate code. One of the
things you will learn about Python, if you're more familiar with a language like Java, is that Python
doesn't force you to do any of that stuff. You don't even need to explicitly declare variable types,
because Python uses duck typing.

Python is a multi-paradigm language too. That means that whatever programming style you're
used to in any other language, you can probably adopt the same style to Python. Of course, some
Python code is more elegant (or Pythonic) than other code. As you get used to reading Python code,
you'll get a better of sense of that elegance.

But the best way to actually get started learning Python is to find a friend who knows it, and buy
them a cup of coffee in exchange for an hour of their time.

2.2k Views · View Upvoters

Upvote 10 Downvote

Recommended All

Jim Dennis, Python from an Ops perspective


Answered Jul 6, 2017

Originally Answered: Where should I start learning Python?

On your own computer.

This may seem like a facetious response at first. But the fact is you shouldn’t try to learn Python on
your smartphone or tablet; nor on someone else’s computer if you have any choice in the matter.
You can start in your browser. For example there’s Learn Python - Free Interactive Python
Tutorial which is minimalistic but appears to be fairly flexible (you get access to
the IPython shell, including access to NumPy and pandas ) and they cover some advanced
topics, including NumPy, partial functions and closures, for example.

Another online/browser driven experience is via Code Academy which offers a number of free
courses including HTML/CSS and JavaScript, Unix/Linux command line usage, how to use git ,
and about 10 hours of work in SQL spread across three different courses. From what I
gather Udacity also still offers free courses, including those covering Python for the novice
programmer.

There are many other online courses for Python. Many give you access to some minimal Python
interpreter or code editor and execution engine through your browser. There are
even Brython, and Skulpt , implementations of Python written in JavaScript such that can run
completely within your browser! (The other examples mostly are running the Python interpreter on
their servers and the browser is just relaying the code back and the results forth).

But, ultimately, you should learn how to install and use Python on your local system with plain,
old-fashioned, regular files. The Google Developers’ Course in Python takes this approach. Those
online (and tablet/smartphone) ways of accessing Python are newer, fancier, and each will have
quirks and limitations which won’t match the assumptions of other documents, books, how-to
guides and so on.

290 Views · View Upvoters

Upvote 2 Downvote

Recommended All

Rishav Walde, studies National Cyber Security Alliance & Cybercrime at


Savitribai Phule Pune University (2020)
Answered Mar 18, 2017
Originally Answered: Which is the best website or online free material to learn python from basics?

1. Code Academy – Interactive, Beginners

There are many interactive tutorials available for Python that let you write code in the browser and
see the results live, right there. That is what makes learning fun! Code Academy hosts the best
interactive Python tutorials for beginners.
As of today, there are 2.5m students enrolled for this course. The course length is 13 hours,
approximately.

It covers Python syntax, strings and console output, conditional and control flow, functions, lists
and dictionaries, loops, file input and output and also talks about advanced python options. You get
to build small projects as you learn, step by step instructions make coding these projects easy, right
there in the browser.

Couple of the example projects that you build while learning Python on Code Academy are – “Tip
calculator” and a small board game named “Battleship”.

2. TutorialsPoint.com – Beginners, Online

Want to learn Python from Scratch? Tutorials for Java Concurrency, Spring AOP, Gerrit, Spring
MVC, Apache Solr, Excel Power View, Sencha Touch, Tex Commands, Agile Testing, Apache Tajo,
C++ Library, MariaDB, SAP QM, SAP SOLMAN, SAP SCM, MS Access, KoaJS, OAuth2.0, Scrapy,
SAP CCA, SAP PM, SAPUI5, Cognos, Internet of Things, Rural Marketing, Trampolining, Golf,
CakePHP, SAP EWM, Web Dynpro, Angular2, Framework7, Arduino, CherryPy, Firebase,SAP C4C,
SAP Dashboard, SAP PI, ExpressJS, Design Thinking, Internet Security, PyGTK, Apache Drill,
Excel Charts, Elastic Search, Computer Security, Extreme Programming, Behavior Driven
Development, Conversion Rate Optimization, SAP Basis, Business Law, Kanban, Erlang, SAP
Payroll, ASP.Net WP, PouchDB, MFC, SAP HR, Yii, Clojure, Aurelia, CoffeeScript, CPanel, Laravel,
SAP Webi, MS SQL Server, pinterest, Indian Polity, Teradata, Windows10 hosts one of the most
comprehensive tutorials for learning Python basics and fundamental concepts. Anyone who is
totally new to programming can also start learning with Tutorials Point’s Python tutorials. It starts
by giving high level overview of Python, talks about environment setup, basic syntax, and variable
types, operators, decision making, loops etc. and the depths of the language.

Tutorials Point also talks about advanced concepts like CGI programming, database access,
multithreading, XML processing, GUI programming and Networking etc.

3. Codementor.io – Advanced, For Experts, Online

Codementor is a perfect place to find advanced tutorials if you are an expert developer. This is not
about step by step Python learning guide but comes with tutorials to complete specific development
tasks using Python. This website keeps on adding new tutorials on regular basis and you can keep
yourself updated with latest tutorials by signing up to their newsletter.

Given below are few examples of the kinds of Python tutorial you will find on Codementor – Hire
Expert Developers for On-Demand Mentorship & Freelance Projects –
- Building a movie recommendation service using Apache spark and Flask – In Python

- Sorting Git Authors in less than 10 lines of code, of course, using Python script

- Data Science with Python & R: Sentiment Classification Using Linear Methods

- Integrating Node.js & Python to Write Cross-Language Modules using pyExecJs

- Advanced Uses of Python Decorators

4. PythonChallenge.com – Advanced, Interactive

Love challenges and also want to learn the depths of Python programming language, there is no
better resource on the internet than The Python Challenge . This one of course is not for the
absolute beginners and also not for the kinds who just take notes in the classrooms for overnight
cramming/reading without bothering their brains much.

Visit this website, if you want to keep your creative juices flowing. There are 33 levels at the
moment and the very first one itself has the potential to get you engaged and addicted to the
website.

5. Google’s Python Class – Free eBook, Intermediate

Tutorials from Google developer on Python are well written and cleanly organized. It is all about
theory though, without any practical step by step instructions to build projects. Python tutorials
from Google developers are Best suited when you want to read through while on the go and/or for
those who already have some basic programming background.

This entire Python tutorial set is organized in three sections –

Python Course – This section talks about Python setup, basics of Python like strings, lists, sorting,
regular expressions, utilities etc. and feeds you with the fundamentals of the language.

Lecture videos day1, day2 – Not the reading kinds, no problem, you can go through the video
lectures divided into day1 and day2 and grasp the fundamentals of the python language.

Python Exercises – This is what makes python learning interesting. There are basic exercises, an
exercise around baby names, and one for “copy special” feature and one on the log puzzle. You need
to get your head around to understand and get these exercises done.

You can download the Python code used in the exercises and run locally on your machine. You can
also ask questions to clarify your doubts in google groups.
6. Python.org – Online, Beginners Python Tutorial

This is the official Python guide and is best suited for those who need a comprehensive tour of the
Python language. Official python documentation is a complete reference to the language and
always updated with the latest features and release notes.

It is always good to skim through the official guide at least once to ensure that you are not missing
on anything basic. The official Python guide covers what is new in Python, Python installation
guides, library references, python how-tos, embedding, extending and distributing Python
modules.

7. Learn Python the Hard Way – eBook, Beginners

Learn python the hard way is one of the sure shot ways to get on-boarded to Python programming.
As per the official website, 1.5 million people read this eBook every year and the book is the most
successful beginner programming eBook in the market as of today.

The paper and digital versions of the book come at a cost but you can read the online version of
complete book, for free. Arguably the best Python tutorial out there in the wild.

8. LearnPython.org – Interactive Python Programming, Intermediate

This website offers interactive python tutorials to master the syntax of python programming
language. The current interpreter runs Python 2 but the tutorial highlights key differences between
Python 2 and Python 3 programming.

The tutorial starts off with Hello world, explains variables and types, lists, basic operators, string
formatting, basic string operations, loops, functions, classes and objects, dictionaries, modules and
packages. You also get exercises at the end of each chapter to get your head working around with
the depths of Python web programming.

9. Invent with Python – Free Book, Online

My colleague has been teaching students earlier, learning programming by building games is what
keeps students engaged for hours. Invent with Python does the same, each chapter has step by step
instructions to build a small game.

As you keep learning, the complexity of games keeps on increasing and learning becomes more fun.
The online version of the book is free but you can also download the pdf version of the book at a
nominal price.

10. Dive into Python 3 – Beginners, Online


This is one of the good reads for beginners as well as for those who already know Python 2 and
want to move to Python 3. Author clearly highlights differences between Python2 and Python 3,
wherever applicable, and ensures that readers grasp the concepts by citing relevant examples.

388 Views · View Upvoters · Answer requested by Abhishek Mitra

Upvote 2 Downvote

Recommended All

Rahul Tripathi, Student at Delhi University at University of Delhi (2016-


present)
Answered Jun 1, 2017
Originally Answered: What is the best online resource to learn Python?

Basically in the online resource we have the some option like as :- Tutorials , E-books, PDF,
YouTube channels, these are the beginners as well as professionals. At the learning phases you will
have to constitutive think about whatever you want to learn. As per my suggestion , for keep the
constitutive learning, you should touch with the Offline classes or Instructor LED Training. so you
should apply for the Python Training with the best training institute as nearest from your home.
Offline Training is the best way for learning the any kind of program as your requirement.

The Benefit for attending the Offline classes:-

Organizing

Engagement and Focus

Versatility – catchphrase "altered instructional classes"

Talk(Discussion)

Capacity to have 1-to-1 if any issue emerges

One of the Best training institute in my knowledge is the CETPA Infotech which is the such a
great institute for the entire IT program, entire embedded system program, and also for the CAD
program.

Why CETPA is the Best :-

Basically, CETPA works on the three module like as :-

Training,

Development
Placement

CETPA provides specialized training in 50+ leading technologies like .NET, Java, PHP, Ethical
Hacking, ANDROID, CCNA, AUTOCAD, VHDL, MATLAB, EMBEDDED SYSTEM, HVAC and
many more.

CETPA has a very committed team consisting of technical trainers who are continuously guiding,
mentoring, admonish and coaching the students by providing them with exclusive personalized
attention, which helps them to develop solid industry oriented knowledge.

How can you contact to CETPA :-

CETPA Infotech Pvt Ltd

CETPA placed into several Location:-

CETPA Lucknow,

CETPA Noida,

CETPA Dehradun

Click here and choose the best place :- CETPA Contact Us

To get the known about the :- Python Training in Noida

Thanks for the Reading :)

Das könnte Ihnen auch gefallen