About 3,140,000 results
Open links in new tab
  1. Python int() Function - GeeksforGeeks

    Mar 19, 2025 · The Python int() function converts a given object to an integer or converts a decimal (floating-point) number to its integer part by truncating the fractional part. Example: In …

  2. Python int() (With Examples) - Programiz

    The int() function converts a number or a string to its equivalent integer. Example # converting a floating-point number to its equivalent integer result = int(9.9) print('int(9.9):', result) # int(9.9): 9

  3. Python int() Function - W3Schools

    The int() function converts the specified value into an integer number. A number representing the number format. Default value: 10. Convert a string into an integer: Built-in Functions. Track …

  4. Python int(): Convert a String or a Number to an Integer - Python

    Python int() examples # Let’s take some examples of using Python int(). 1) Using the int() to convert a string to an integer # The following example uses the int() to convert strings to …

  5. Python int

    Python int - Integer is one of the basic built-in datatype in Python. int is the keyword for an integer in Python. In this tutorial, we learn: int initialization, print int to console, int range, int arithmetic …

  6. int | Python’s Built-in Data Types – Real Python

    In this example, the int data type is essential for converting binary strings into decimal numbers, allowing you to perform further calculations or analyses on the data. In this tutorial, you'll learn …

  7. Python Numbers: int, float, complex (With Examples)

    In Python, integers are zero, positive or negative whole numbers without a fractional part and having unlimited precision, e.g. 0, 100, -10. The followings are valid integer literals in Python. …

  8. int() in Python - Built-In Functions with Examples - Dive Into Python

    The int() function in Python is a built-in function that converts a specified value into an integer number. It can convert numeric strings or floating-point numbers to integers, and also takes an …

  9. Python Integer: Non-Fractional Numbers (With Example Code)

    Dec 11, 2022 · The Python integer is a non-fractional number, like 1, 2, 45, -1, -2, and -100. It’s one of the three types of numbers Python supports natively, the others being floating-point …

  10. Python Function `int()`: A Comprehensive Guide - CodeRivers

    Apr 5, 2025 · In Python, the int() function is a fundamental built - in function that plays a crucial role in data type conversion and numerical operations. It allows developers to create integer …

Refresh