What is Python? 

Python is an object-oriented programming language created by Guido Rossum in 1989. It is so popular and in many operation system from Windows to Linux, Ubuntu or MacOS. Python is an interpreted language, every one can open an terminal and type some Python command on that. Python is used to build software application in ML and AI programs, Machine Learning, Live streaming data, Bigdata, Math and Physics and other science fields. Python is complementary for Java and It cannot replace Java in the Global IT market.

Learn fast Python from Java language:

Java developer can be easy to understand Python programming language by compare it with Java, to know What are similarities and What are differences with Java programming language. So a Python cheat_sheet document is the way to learn basic Python shortly.


Python can have multi-inheritance in class but Java is not.
Java does not have Tuples type. Tuples type in Python are data structures that are very similar to lists (+array), but they can’t be modified; they can only be created.
In Python, you both declare and define attributes inside the class __init__(), which is the equivalent of Java’s constructor:
def __init__(self, color, model, year):
    self.color = color
    self.model = model
    self.year = year

self and this

In Java, a class refers to itself with the this reference:

public void setColor(String color) {
    this.color = color;
}

this is implicit in Java code:

In Python, the keyword self serves a similar purpose. It’s how you refer to member variables, but unlike Java’s this, it’s required if you want to create or refer to a member attribute:

class Car:
    def __init__(self, color, model, year):
        self.color = color
        self.model = model
        self.year = year
        self._voltage = 12

    @property
    def voltage(self):
        return self._voltage



Reference documents: