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.
__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
I'm cheerful I found this blog! Every now and then, understudies need to psychologically the keys of beneficial artistic articles forming. Your information about this great post can turn into a reason for such individuals.
ReplyDeleteServicenow Training in Hyderabad