Basic Data Types in Python

In this Post i will show you some of the basic data types in Python:

In Python 3, there is effectively no limit to how long an integer value can be. Of course, it is constrained by the amount of memory your system has, as are all things, but beyond that an integer can be as long as you need it to be:

int = 1234567894567234562782345

The float type in Python designates a floating-point number. float values are specified with a decimal point. Optionally, the character e or E followed by a positive or negative integer may be appended to specify scientif notation.

floatA = 4.2
floatB = .4e8

Strings are sequences of character data. The length of strings is only limited by the space on your device.
Strings are identified by single or double quotes. Strings can be empty as well.

stringA = „Hello“
stringB = „Goodbye“

Here is a source which I really liked and which gives you a nice summary with some examples for all data types:

Kommentar hinterlassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

Du kommentierst mit Deinem Abmelden /  Ändern )

Google Foto

Du kommentierst mit Deinem Google-Konto. Abmelden /  Ändern )


Du kommentierst mit Deinem Twitter-Konto. Abmelden /  Ändern )


Du kommentierst mit Deinem Facebook-Konto. Abmelden /  Ändern )

Verbinde mit %s

Erstelle deine Website auf
Jetzt starten
%d Bloggern gefällt das: