Data Types (Data Types), lesson, page 724622
https://www.purl.org/stefan_ram/pub/data_types_python (permalink) is the canonical URI of this page.
Stefan Ram
Python Course

Data Types in Python 

Each object has a specific class  that determines where the object can be used.

Classes are objects.

int

The object of an integer numeral has the class ›int‹ (regardless of whether it is a decimal or hexadecimal numeral).

This class can still display a great many digits accurately.

Input of an expression and output of a text representation of its value
9_223_372_036_854_775_808
9223372036854775808
Input of an expression and output of a text representation of its value
999_999_999_999_999_999_999_999_999_999_999_999_999
999999999999999999999999999999999999999

 ›float

If a numerical is written with a dot ».«, it's value is an object of type ›float‹.

Values of this type can be imprecise or incorrect in the lower positions.

Input of an expression and output of a text representation of its value
1.999_999_999_999_999_9
2.0
Input of expressions and output of a text representation of their values
9_007_199_254_740_991.
9007199254740991.0
9_007_199_254_740_992.
9007199254740992.0
9_007_199_254_740_993.
9007199254740992.0

»E« within a numeral means „times ten to the power of“ and also determines the type as ›float‹.

Input of an expression and output of a text representation of its value
2E3
2000.0

str

An object that is the value of a string literal has the class ›str‹.

About this page, Impressum  |   Form for messages to the publisher regarding this page  |   "ram@zedat.fu-berlin.de" (without the quotation marks) is the email address of Stefan Ram.   |   A link to the start page of Stefan Ram appears at the top of this page behind the text "Stefan Ram".)  |   Copyright 1998-2020 Stefan Ram, Berlin. All rights reserved. This page is a publication by Stefan Ram. relevant keywords describing this page: Stefan Ram Berlin slrprd slrprd stefanramberlin spellched stefanram724622 stefan_ram:724622 Data Types Stefan Ram, Berlin, and, or, near, uni, online, slrprd, slrprdqxx, slrprddoc, slrprd724622, slrprddef724622, PbclevtugFgrsnaEnz Explanation, description, info, information, note,

Copyright 1998-2020 Stefan Ram, Berlin. All rights reserved. This page is a publication by Stefan Ram.
https://www.purl.org/stefan_ram/pub/data_types_python