S. Coughing
S. Coughing

Reputation: 186

What are the full range of values for str, double, and complex including their size in memory?

Basic data types: Python basic data types with their range of values provided in the following table.

I don't know the range for double, complex, str, and the size for all the data types I can't find any information on the web; when I use getsizeof() it gives me a large number because it has something to do with the added overhead, and there was another function that ignored said overhead but the size is still big: and, I'm not sure if that is correct.

Upvotes: 0

Views: 568

Answers (1)

DYZ
DYZ

Reputation: 57033

Python integer numbers have unlimited range (see also sys.int_info). The range of floating-point numbers can be found in sys.float_info. There are no double numbers in Python. Complex numbers are represented as pairs of floating-point numbers.

Upvotes: 1

Related Questions