Python

Why learn Python?

Python is a general purpose programming language. In addition to web application development, Python is widely used in Data Science, Artificial Intelligence, and Machine Learning.

It is also a popular teaching language partly because of the simplicity and high-readability of its syntax. MIT and UC Berkeley, among others, use it as their introductory language for Computer Science.

Python is often described as a batteries-included language because it ships with a comprehensive standard library. And if a feature you need is not in the standard library, there will most likely be a mature and battle-tested library for it on the Python Package Index (PyPi).

Web Application Development

Data Science

Artificial Intelligence/Machine Learning

Learning a New Language

Since you already know JavaScript, you will find it much easier to learn new languages by comparing how similar concepts are implemented differently. Here's a small example of how the same function with the same logic is written in both JavaScript and Python. This is just a sneak peek. We will discover more of these differences as we dive deeper into Python.

JavaScript

const fibonacci = (num) => {
  let a = 1, b = 0, temp
  while (num >= 0) {
    temp = a
    a = a + b
    b = temp
    num--
  }
  return b
}

Python

def fibonacci (num):
    a, b = 0, 1
    while num >= 0:
        a, b = a + b, a
        num -= 1
    return b

Last updated