Does python have a double type?

anonymity
Release: 2020-01-16 16:58:26
Original
55455 people have browsed it

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
Copy after login

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

del var1[,var2[,var3[....,varN]]]]
Copy after login

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

del var1
del var1, var2
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!