Home  >  Article  >  Backend Development  >  Does python have a double type?

Does python have a double type?

anonymity
anonymityOriginal
2019-06-14 16:13:3555470browse

Python has five standard data types: Numbers (Numbers) String (String) List (List) Tuple (Tuple) Dictionary (Dictionary)

Recommended Manual:Python basic introductory tutorial

The data types belonging to the collection type include lists, tuples and dictionaries.

Does python have a double type?

Numbers

The numeric data type is used to store numerical values.

They are immutable data types, which means that changing the numeric data type will allocate a new object.

When you specify a value, a Number object is created:

var1 = 1
var2 = 2

The del statement deletes references to some objects. The syntax is:

del var1[,var2[,var3[....,varN]]]]

Pass Use the del statement to delete references to single or multiple objects. For example:

del var1
del var1, var2

Four different number types: int (signed integer) long (long integer [can also represent octal and hexadecimal]) float (floating point)complex (plural)

float (floating point)

Floating point numbers are used to handle real numbers, that is, numbers with decimals. Similar to the double type in C language, it occupies 8 bytes (64 bits), of which 52 bits represent the base, 11 bits represent the exponent, and the remaining bit represents the symbol.

Recommended related articles:
1.How many bytes does Python’s floating point number occupy?
2.Five basic Python data types
Related video recommendations:
1.Little Turtle Zero Basics Getting Started Learning Python Video Tutorial

The above is the detailed content of Does python have a double type?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn