How to start with Python

mateomatrix

Newbie
Joined
Apr 23, 2016
Messages
14
Reaction score
1
Hi guys! I want to learn Python. I have a little experience in C/C++. What might be the best way for me to learn Python? Do you think, I should come up with a project and try to build it in new programming language (Python), or it's better to take a book or course? If book/course, which do you recommend?
 
What did you do with C/C++? Whatever you did try and do it in python.

There is plenty of youtube tutorials out there that should help.

The longer you spend "thinking" about what to do the less time you spend coding.
 
Yeah I wouldn't pay for tutorials on python. And books on it are easy to get for free just search "python PDF"

A book that often gets mentioned is dive into python.
 
start with codeacademy and other tutorial sites, there is a lot of good free content online.

He already knows how to code and CodeAcademy generally takes a new coder into being a coder. So I'm not sure if this would be efficient.

I recommended just looking up the syntax, and then coding stuff for practice. That's what I do when I start a new language.
 
start with a project straightaway . either scrape some data using scrapy or start a website using django
 
I've been learning Python latelyyself. Like other's have said, there's a wealth of free information available. Some of the best I've found so far are from
'sentdex' on YouTube, who's website is www.pythonprogramming.net.

If you find other quality resources in your travels, share them here for the rest of us!
 
start with codeacademy and other tutorial sites, there is a lot of good free content online.

I second "Codeacademy" I ran through their Python training a couple months back. Makes it very simple. There's also some awesome free resources online. Google "Python PDF training" and click on the PDF from simeon franklin. Very helpful.
 
YouTube should be a good place to START. Then move to codeacademy.
 
I second Zed Shaw's book: http://learnpythonthehardway.org/

I'd pretty much first install Python 2.7. Then google how to install PIP ( so you can quickly install libraries you'll want for automation or whatever ). I'll assume that you want this to automate your marketing efforts, no?

Then install ..well..the typical libraries I use. ( via pip , from cmd )
pip install requests ( to make requests )
pip install selenium ( browser automation )
pip install mechanize ( old way to make requests but it's useful when filling forms )
pip install beautifulsoup4 ( for scraping )

Then, besides the basics, I'd tell anyone to try a practical example so they feel what python will be useful for. Typically some interaction with the web. So on Windows Start > IDLE ( basically run the python interactive interpreter )
Code:
import requests
from bs4 import BeautifulSoup

page_source = requests.get('http://google.com').content
soup = BeautifulSoup(page_source)

title = soup.title
print title
<title>Google</title>
print title.string
u'Google'

Or something like that. Basically I think one should do something practical right off the bat so you get hooked and learn with passion.
 
When we added Python to UBot we wrote a little resource page with ideas for getting started here. Maybe it will help you: http://network.ubotstudio.com/blog/python-and-ubot-python-gives-your-bots-a-voice-and-much-more/
 
What did you do with C/C++? Whatever you did try and do it in python.

There is plenty of youtube tutorials out there that should help.

The longer you spend "thinking" about what to do the less time you spend coding.

just don't do this, you can do loops like in c/c++ but the python way its easier to do and to read, its the same thing for classes, theres the java/c++ way and theres the python way totally different, just read learn python in the hard way

Also start using python 3, no need to go for python 2.7.
 
Anyone interested in using Python for any kind of automation might find "automate boring stuff with python" useful. It's an online book, full text is available at it's site, google it. I use it as a reference for how to do certain things the "pythonian" way. And of course for all simple web-related things you'll use requests library with BeautifulSoup. For things, which are obfuscated and hidden behind some complex JavaScript, you will use selenium most of the time.
 
Check automatetheboringstuff.com or his videos on youtube
 
Automate the Boring Stuff with Python Chapter 11 is a good way to start to get ideas.
 
I think the best way to improve at some particular programming language is to improvise. Start off with a simple project. Try to come up with a solution and code it up. Afterwards do some polishing ontop of it and try to scale it up to a part where it could be worth selling it. I suggest starting off with simple bots.
 
if u have experience in C/C++ , python will be easy for you just give it some time
python it my favorite language it easy and powerfull .
just check youtube , i start there .
 
There is a free online book called A Byte of Python.
It's pretty good, and free.
 
Back
Top