1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to start with Python

Discussion in 'Other Scripting Languages' started by mateomatrix, Apr 23, 2016.

  1. mateomatrix

    mateomatrix Newbie

    Joined:
    Apr 23, 2016
    Messages:
    14
    Likes Received:
    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?
     
  2. Morpheus696

    Morpheus696 Registered Member

    Joined:
    Apr 11, 2016
    Messages:
    91
    Likes Received:
    40
    Gender:
    Male
    Occupation:
    I do stuff, people pay me.
    Location:
    /dev/null
    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.
     
  3. BuildMoreLinks

    BuildMoreLinks Jr. VIP Jr. VIP Premium Member

    Joined:
    Jun 7, 2012
    Messages:
    2,032
    Likes Received:
    684
    start with codeacademy and other tutorial sites, there is a lot of good free content online.
     
  4. Morpheus696

    Morpheus696 Registered Member

    Joined:
    Apr 11, 2016
    Messages:
    91
    Likes Received:
    40
    Gender:
    Male
    Occupation:
    I do stuff, people pay me.
    Location:
    /dev/null
    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.
     
  5. macdonjo3

    macdonjo3 Jr. VIP Jr. VIP

    Joined:
    Nov 8, 2009
    Messages:
    5,637
    Likes Received:
    4,374
    Location:
    Toronto
    Home Page:
    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.
     
  6. maxibaby

    maxibaby Junior Member

    Joined:
    Apr 20, 2013
    Messages:
    103
    Likes Received:
    39
    Occupation:
    Student
    Location:
    Venezuela
    Look for sentex YouTube python tutorials
     
  7. divok

    divok Senior Member

    Joined:
    Jul 21, 2010
    Messages:
    1,067
    Likes Received:
    648
    Location:
    .IN
    start with a project straightaway . either scrape some data using scrapy or start a website using django
     
  8. Sebastian Rooks

    Sebastian Rooks Registered Member

    Joined:
    Nov 16, 2015
    Messages:
    82
    Likes Received:
    54
    Location:
    Middle America
    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!
     
  9. JuicyJuice

    JuicyJuice Newbie

    Joined:
    Dec 22, 2012
    Messages:
    34
    Likes Received:
    13
    Location:
    Internet Land
    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.
     
  10. artemis42

    artemis42 Regular Member

    Joined:
    Oct 5, 2015
    Messages:
    334
    Likes Received:
    84
    Occupation:
    Self-employed
    YouTube should be a good place to START. Then move to codeacademy.
     
  11. MrBlue

    MrBlue Senior Member

    Joined:
    Dec 18, 2009
    Messages:
    974
    Likes Received:
    680
    Occupation:
    Web/Bot Developer
  12. DraculaServers

    DraculaServers Newbie

    Joined:
    Jun 5, 2016
    Messages:
    16
    Likes Received:
    5
    Occupation:
    Server Hosting Provider
    Location:
    No Witty Location Yet
    Home Page:
    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.
     
    • Thanks Thanks x 1
  13. SethTurin

    SethTurin Jr. VIP Jr. VIP

    Joined:
    Nov 19, 2011
    Messages:
    282
    Likes Received:
    147
    Occupation:
    President and CEO of Seth Turin Media, Inc. - Crea
    Home Page:
  14. Javardo69

    Javardo69 Junior Member

    Joined:
    Jul 19, 2014
    Messages:
    106
    Likes Received:
    6
    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.
     
  15. sneaky_merchant

    sneaky_merchant Newbie

    Joined:
    Jul 30, 2016
    Messages:
    5
    Likes Received:
    0
    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.
     
  16. Carlos TV

    Carlos TV Regular Member

    Joined:
    Jan 19, 2016
    Messages:
    267
    Likes Received:
    68
    Location:
    Spain
    Check automatetheboringstuff.com or his videos on youtube