Python Programming in 15 min Part 2
Vihar Kurama
4474

“__init__” method is not a constructor, it’s an initializator, the constructor method is called “__new__”, but the former is more commonly used. Would be great to post the pre-python 3.6 version and the python 3.6 version of the examples, for example, with the “print” statement, you can put the new way to do that with the string formatting interpolation from python 3.6, for example: print(f”Hello {self.name}”).

Best.

~g

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.