Description: Learning python (help for programmers)
File name: Learning python (help for programmers)
Meet the Expert
Daniel Melton is a software engineer and coding enthusiast. He has worked on various development projects over the years, gaining experience in many programming languages, including Python, Java, and HTML/CSS. Most of Daniel’s time is spent coding new projects for his development company Techtonics, participating in local coding competitions, and teaching middle school kids how to program.
Nowadays, just about everyone wants to be a programmer. In today’s technology-driven world, programming is an in-demand skill that can lead to not only lucrative, but also innovative and exciting career opportunities. However, there are now numerous different languages one can study to get into the field. Both aspiring and seasoned programmers gravitate to Python because it’s readable, requires little setup, and is easy to understand and write. Knowing exactly where and how to start learning it, however, can be challenging.
In this guide, beginner Python developers can get an introduction to the basics, find out where to learn the language, and also get access to several different resources that have been handpicked by a Python developer or are highly recommended in the developer community. By the end of the guide, you should have a solid foundation to further your knowledge and get closer to your goal of becoming a Python programmer.
Coding Language Comparisons
PHP RUBY PYTHON
Programming in Python
Python is an extremely versatile language used in a wide variety of applications today. Whether you want to build a video game using the PyGame library, write a quick script to automate a task, or build a web application, Python is a terrific fit to get the job done. This is because the language is highly extensible — it has libraries and other extensions that allow it to fit in most applications. This is a terrific asset when trying to find a balance with productivity, speed, and readability. The language is also easy to pick up and learn. But just like every other coding language, there are pros and cons to using Python. Before you ever write your first line of code, ask yourself “What am I trying to build here?” and “Do I value how fast I develop the code over how fast I would like the code to run?” Asking yourself these questions prepares you as the developer to pick the most suitable language for the job.
While the speed of development is a huge plus for Python, it does not run as fast as other languages such as C, C++, and Java. It could take a Python developer one month to write code that would normally take a C programmer six or more months to develop, but at the end of the day, code written in C will run much faster than code written in Python. One’s end goals will likely be a significant factor when determining which type of language to use. For example, it may be imperative that the code run quickly. In that case C might be the better option. However, if the goal were to get the code running and in the market as quickly as possible, then Python would be the better choice.
Code Style & Noticeable Features
There is no single aspect or feature of Python that makes it unique from other coding languages; rather, it is a combination of its features that makes it stand out. Python does not incorporate anything overly innovative in its features. Instead, it takes existing coding language concepts and improves upon them.
Simplicity & Productivity
Style is what makes Python so popular. Python can be summed up in two words — simplicity and productivity. Start typing just a few words of Python code and you already have working code. The amount of time and energy one saves in writing less code is just the beginning with Python’s productivity. The language has a number of other benefits. For instance, Python comes with an extensive and easy to use standard library that makes coding much quicker. Say you want to read an input text file. In Java, it would take several lines of code to make this happen; however, in Python, all it would take is “file.read()”. This gives the programmer quick prototyping and easy to understand code in a matter of seconds. Additionally, Python does not need any real initial setup — you do not need to write classes and then methods inside those classes in order to start executing code.
Another equally important key aspect of Python is its simplicity. Your code should be written in such a way that almost anyone could pick it up and easily understand what it is doing. Below is an example of both productivity and simplicity. The strong of code illustrates that it takes very few lines to accomplish a task in Python, and the code is also easy to understand when compared to the same task written in Java.
Here is another code comparison to illustrate Python’s simplicity.
This code is meant to print to the console “Hello, World”. Not only is there far less code used in Python, you can clearly see that the actual words in the python statement would make sense to anyone.
While there are still best practices one should adhere to in Python, the language itself enforces a few rules that will ensure the programmer is writing clean code. In the example code above, you can see where the Java code is using braces in order to structure its code. Here, it is basically saying, “Everything within these braces is working together to accomplish something”. The braces determine the block of code. For Java, where you put those braces is purely style choice — it doesn’t really matter as long as the braces surround the code you care about.
In Python, code blocks are structured using indentation instead of braces and the indentation is actually a programming requirement as opposed to a choice in styling. This is a requirement in the sense that if you do not indent correctly, your code will not run. The following code example illustrates the idea of indentation. The indented pieces of code are a part of the “if “ statements that they are contained in, which gives your code actual structure and readability.
How to Learn Python
The Internet is a treasure trove of knowledge, a place where one can search for anything and find a billion different answers. As a result, searching for things like “Python for beginners” and “Python made easy” can be overwhelming, and often times websites do not cover the very basics for those new to the language. That is one of the hardest parts about starting out on the Internet – most sites assume readers already have programming experience and are simply looking to learn a new language.
Another thing to consider is the way you learn best. Some people are visual learners and need to actually see examples of code and how they work in order to absorb and fully understand the information. Others may not need many visuals and may be able to learn from reading a textbook. Still others might need one-on-one instruction in a classroom. Below is an overview of the most common learning options for aspiring Python developers to help you find the best fit.
Colleges and Universities
Pursuing a computer science degree at a college or university can be a great way to get hands on experience and to have a professor guide you through some of the tougher aspects of programming, as well as computer science in general. There are many different focuses one could pursue with the pairing of programming.
Applied Computer Science
Theoretical Computer Science
Given the versatility of the Python language, a computer scientist can apply Python to any of these fields. All these fields will have similar core classes that form the foundation of the student’s education. The fields of computer science, software engineering, and information science are all examples of degrees that will give students a broad perspective of applied programming in the real world.
However, getting a CS degree is not always essential to landing a job in computer programming. Some of the best Python developers have never taken a formal coding class through a college or university. Of course there are always exceptions to the rule, and holding a computer science degree – particularly from a prestigious institution – can open the doors to more career opportunities and higher salary potential.
Online tutorials are one of the most effective – and affordable – resources one can use when first learning Python. Perhaps two of the best sites among the development community is Codecademy.com, a hands-on, self-paced online tutorial and, which offers tons of videos of other programmers walking through code. Online tutorials can benefit both novice and senior Python programmers. These options can be ideal for those on a limited budget, those who want to learn quickly, and those looking for a refresher or solution to a specific issue. Below is a breakdown of some online tutorial options for Python students and developers.
The site has a window to write Python code in as well as information on the side discussing the lesson in progress. It also has a help forum where other students can post get help when stuck on an exercise. Each lesson builds on the next to build a solid foundation for anyone looking to become a Python programmer. This site offers a series of courses that focus on the following Python topics:
This online tutorial site is another good option for those who enjoy interactive learning. LearnPython has the option of both beginner chapters and advanced chapters, offering Python developers of all skill levels something to learn. The bottom of the window has an interactive coding window that allows one to code, run the program, reset the program, and find the solution.
Udemy offers online video training tutorials that are led by an instructor. The videos take you step by step through Python, many of which provide downloadable files and exercises that ease the process for the developer. Although most videos cost about 0 on average, some tutorials come with certifications or bootcamps that can give the user a special bonus. Udemy is a terrific resource for those who enjoy well-structured, professional videos and a classroom-like setting for a small fee.
is the perfect balance to Codecademy. It offers a different, but equally important method where a fellow programmer walks you through code via an instructional video. Every video differs and some may be of higher quality than others, but if you get stuck, this is a great place to go for solutions. The downside to this method is that topics are limited to those that have been posted and students may spend a lot of time trying to find the right video. However, if you are not keen on reading through documents and books, and prefer a more visual – and free – approach, this is a great choice.
Python coding bootcamps are intensive, accelerated courses that teach aspiring coders essential Python skills, typically over the course of a few months. Bootcamps are great in that they bring students together with experienced programmers and only last a few months, which can be ideal for those who do not have the time to commit to a CS degree program. These bootcamps, however, are not free and students have to be willing to sacrifice many back-to-back hours to complete the course since it is so fast-paced.
In addition to being demanding, bootcamps are virtually impossible to attend for most full time workers due to the long hours each day requires. Coding bootcamps are also limited in location – most are offered in big tech hubs such as Silicon Valley and New York. The ideal candidate for this route would be someone who has no job commitments at the moment such as a recent college graduate, someone in between jobs, or someone able to take a sabbatical from work.
Despite the drawbacks, many bootcamps come with a serious perk – at the end of the course, many introduce graduates to partner companies or have well-connected and dedicated teams to help grads find a programming job so they can put their new skills to use quickly.
Resources for Beginners
This site is terrific in getting one trained on Python. It’s also the most popular resource in the programming world when it comes to learning a new language. This is because the site starts with the very basics, and it assumes you know nothing. Codecademy displays the site lesson on the left and has its own development environment on the right for you to practice out the current lesson. Badges are earned a long the way, signifying milestones that you have accomplished along your Python journey.
Practice makes perfect, and here you can get in some basic practice where they will test your results against their tests right before your eyes. This site has different practice problems that allow one to work on different areas of Python. For example, one could take an easy problem on Strings and then try an intermediate problem on integers. The site challenges you to think of the best way to code a problem, supplying a reward with “stars” if you solved it the best way. The way the questions work is they present you with a problem that you need to use a function in order to solve. The site then takes your code and runs tests on the right side of the screen to validate the logic of your program.
Head First Pythonby Paul Barry
Barry’s book uses the latest in cognitive science to teach the language of Python, focusing on giving the reader the best experience to retain information. The book is full of detailed code examples using picture and humor to maintain your attention and interest. The book actually walks the reader through real-world coding examples, like developing your own mobile app all in Python.
Learn Python the Hard Wayby Zed Shaw
This is the most popular beginner book on the market for Python. The book emphasizes that the best learning is in you writing the code yourself and not just learning by reading others code and their fixes for common code issues. The book goes over all the basics you will need to be successful while adding fun by walking you through coding your own game.
Learning Pythonby Mark Lutz
Thorough is one word to describe this monstrous book. There is a lot of information in this book, but with all the coding examples and topics you will be leaving this book a pro.
Practical Programming: An Introduction to Computer Science using Python3 by Paul Gries
The author’s aim in this book is to teach you exactly how computers and programming works all while coding in Python. The reader will learn about design, testing, and how to think like a programmer when approaching problems. Real-world problems are included throughout the book to give the reader a better feel for what real challenges they would face in the workforce.
One of the most used tools in a developer’s tool belt is Stack Overflow. If you are looking for Python advice, code fixes, tools, etc. then this is a site that probably already has the answers. Developers come here to ask their questions to the development community, and more than likely if one has an issue then someone else has probably already had it too and asked about it here. If the developer cannot find the answer, then the site will allow one to post their question where other developers can see and provide comments to help.
Udemy: Python Programming for Beginners
Udemy presents video learning sessions that walk beginners through the fundamentals of Python while allowing them to code real-world problems. The course is not cheap at dollars; however, with over 200 ratings that average at nearly 5 stars the course is clearly an effective one.
Advanced Python Resources
Hands-On Django: Going Beyond the Polls by Brandon Lorenz
If one decides try out web application development, then using Python with the Django framework is the best route to go down. Django allows the developer to build high-end application with less code, and this book shows the developer how. This is a great place to learn the Django framework, but this book still takes an experience Python programmer to truly absorb the content of this book.
Lightweight Django by Julia Elman
Lightweight Django takes an experience Django developer through application development projects that include REST APIs, WebSockets, and client-side MVC frameworks. This book shows the developer how to build single-page applications that respond to interactions in real time. This is a solid book that will train the developer on highly desired skills.
Professional Python by Luke Sneeringer
There are many tools and techniques available in Python, but the documentation out there is too hard for most people to understand. Professional Python simplifies these hidden gems so the reader understands the full power Python brings. Coverage includes Decorators, Context Managers, Magic Methods, Class Factories, Metaclasses, Regular Expressions, and much more. This is an excellent read that removes the fright out of the more confusing, advanced topics in Python.
Programming Python by Mark Lutz
This book is a follow-up to Learning Python, where Lutz talks about more advanced topics such as: GUI programming, databases, networking, Internet scripting, parallel processing, etc. Lutz provides numerous code examples and walks the reader slowly through these advanced topics. Like his previous book, Programming Python is a heavy but comprehensive read.
Udemy.com: Complete Python Bootcamp
Combining the effectiveness of Bootcamps with the ease of online video, Udemy brings a new type of class in Python that teaches beginners and advanced Python programmers all new concepts. A beginner could take this class, but a more advanced programmer would be better suited, given the complexity of the topics covered.
Udemy.com: Python the Next Level (Intermediate)
This is a great online tutorial that takes one to the next level of programming in Python. The tutorial trains the coder to program faster, design algorithms, and test to find problems in large code projects.
Python Careers and Salaries
With more and more companies implementing Python to develop their applications, students can rest assured there is no shortage of jobs for this language. Many websites and applications run using Python. Google, the most powerful and widely used search engine in the world, uses Python for its mainframe foundation. The ease in which Google provides users information wouldn’t be possible without it. also uses Python to integrate streaming videos into its webpages, and Instagram runs on Python.
Additionally, because of the growing job opportunities, salaries for skilled Python developers are also on the rise. According to Indeed, Python developers saw a significant spike in salary entering into 2014.
Below is a look at the three most common Python computer programmer roles. The following salaries are based on data from Indeed.com.
Junior Python Developer
Senior Python Developer
The Origin and History of Python
In the 1980s, a man named Guido van Rossum was a key developer in the creation of a programming language knows as “ABC”. While he liked many things about the language, there were still numerous issues he had with the way it worked. He decided to create a simple scripting language that took the best parts of ABC, but left out all the areas he identified as drawbacks. He also wanted the language to appeal to Unix/C hackers. Guido van Rossum named his language “Python”.
The language Guido van Rossum envisioned was simple for anyone to pick up and understand. His focus was readability and development speed, both of which are key features of Python. Many programming languages, such as Java, are known for being very verbose compared to Python. This means that it takes a lot of Java code to accomplish a basic task compared to Python.
Applications for Python
Python is a general use, interpretive programming language, meaning it can be used for just about everything. However, the areas where Python is used most frequently are:
Video game development
As an integration component in larger applications
Python contains libraries that extend its capabilities and allow it to work with other languages, such as C/C++, to make more efficient applications. For example, scientific computation code developed in C can be connected to Python testing code, allowing two developers to work simultaneously.
Python has also made a name for itself in the gaming world. Video games are extremely taxing to run on a system and programs that run the fastest are the ones that excel. That is why most video games are coded in C++. The language is fast and can handle the game’s need for power. For example, every time you move a character in a game you are doing a ton of work in the program – the location of the character is updated and the frame is completely regenerated. If the code runs slowly you are going to see the character stutter when it moves. This is a good example of where Python’s ability to integrate with other languages is valuable. One could implement the Cython library, which essentially translates the Python code to C in order to gain speed for the application. This allows the programmer to utilize the productivity of Python development with the running speed of the C language.
Traditionally, Python was not really used at all in mobile applications, but with a new library called Kivy that has begun to change. Kivy takes your Python code and creates mobile applications from it.