Does Python have double, short long data types

November 29, 2023 · Team EasyExamNotes · 1 min read (est.) · 0 comments

Share on WhatsApp

Python does not have distinct data types like “double,” “short,” or “long” as found in some other programming languages.

Instead, Python has a more simplified approach to numeric types.

The primary numeric types in Python are:

1. int: This is used for integer values. It can represent both positive and negative whole numbers.

2. float: This is used for floating-point or decimal numbers. It can represent real numbers and is suitable for most numerical calculations.

3. complex: This is used for complex numbers in the form a + bj, where a and b are floats, and j represents the imaginary unit.

Discussion

Ask a question, share your thoughts or report an error.

Sign in to participate in the discussion.

Join the discussion