HOME/Articles/

10 beginner tips for learning python

Article Outline

Are you learning to code in <a href="https://python.org">Python</a>?

If you are new to programming it can take some time to master the programming language. If it all seems confusing, here are some tips on becoming a great Python programmer.

Tip 1: Code Daily

Coding daily helps you become proficient in the language. Like any language, it you need to practice using it.

This helps you remember all ideas but also get a feel for programming. If you are just starting out, <a href="https://pythonbasics.org/exercises/">check out these exercises</a>.

Tip 2: Make something

Start by making small useful Python scripts. Like programs that sort numbers, names or files. Start simple and slowly increase complexity.

Some popular course are:

  • <a href="https://learnpythonthehardway.org/python3/">Learn Python the Hard Way</a>
  • <a href="https://automatetheboringstuff.com/">Automate the Boring Stuff with Python</a>

Tip 3: Take a course

Taking a course or having a good instructor is a great way to progress. These days there are many courses available that guide you through the process of learning to code.

Tip 4: Interactive Mode

Python comes with an interactive shell (sometimes named <a href="https://pythonprogramminglanguage.com/repl/">REPL</a>). The Python interactive shell helps you try out things easily.

    Python 3.7.5 (default, Nov 20 2019, 09:21:52) 
    [GCC 9.2.1 20191008] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> print("Hello world")
    Hello world
    >>> i = 3
    >>> print(i)
    3
    >>> 

Tip 5: Breaks

Its important to take breaks, you can't learn by doing something 24/7. Counter-intuitive but taking breaks helps you learn coding.

As you progress, at times you'll find bugs. Don't stress about it, Python has <a href="https://pythonspot.com/python-debugging/">debugging tools</a> that help you fix them.

Tip 6: Take notes

Taking notes helps you form long-term memories. Developers often take notes. On the plus side it allows you to think more freely on paper (diagrams, sketches).

Tip 7: Search for warnings/errors

Coding mistakes and problems are rarely unique. Use Google to find the problem you trying to solve.

Python often outputs the problem when somethings wrong. You can use that output in google to find a more clear solution.

<a href="https://stackoverflow.com">Stackoverflow</a> is a popular question/answer site for Python developers.

Tip 8: Pair programming

Sometimes it helps to learn with someone else who is learning. Programming together is sometimes named "pair programming". This generally helps a lot if one has more experience than the other programmer.

Tip 9: Use an IDE

An IDE is an app ("<a href="https://pythonbasics.org/getting-started/#PythonIDE">integrated development environment</a>") you can use for programming. An IDE makes working with many files a breeze, it comes with coloring and simplifies the whole programming experience.

Tip 10: Search github

<a href="https://github.com">Github</a> stores a lot of software projects. By searching for code on github you can find many examples.