Python is one of the most used programming language in large fields.
Gettting to learn the basics to being a Pro Developer will help you solve programming problems and automate system and also
run big models in machine Learning and AI
Checkout more about String formatting from
Expression | Meaning | example |
---|---|---|
{:d} | integer value | '{:d}'.format(10.5) → '10' |
{:.2f} | floating point with that many decimals | '{:.2f}'.format(0.5) → '0.50' |
{:.2s} | string with that many characters | '{:.2s}'.format('Python') → 'Py' |
{:<6s} | string aligned to the left that many spaces | '{:<6s}'.format('Py') → 'Py ' |
{:>6s} | string aligned to the right that many spaces | '{:>6s}'.format('Py') → ' Py' |
{:^6s} | string centered in that many spaces | '{:^6s}'.format('Py') → ' Py ' |
more on formating
Classes define the behavior of all instances of a specific class. Each variable of a specific class is an instance or object. Objects can have attributes, which store information about the object. You can make objects do work by calling their methods. The first parameter of the methods (self) represents the current instance. Methods are just like functions, but they can only be used through a class.
Special methods start and end with __. Special methods have specific names, like init for the constructor or str for the conversion to string.
Checkout more on dicttionaries
In the modelues quizes, you get to simulate a real servre configuraitons.