Skip to content

Missing scientific notation and Binary in Python #5406

@Mubeen-Ul-Hassan

Description

@Mubeen-Ul-Hassan

You can add the letter e or E followed by a positive or negative integer to specify that you're using scientific notation.
print(16e3)
Output: 16000.0

Python also allows you to represent large numbers in the decimal format using underscores as the delimiter instead of commas to make it easier to read.

num = 16_000
print(num)
Output: 16000

Binary in Python
You can write an integer in Python using binary syntax using the 0b prefix

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions