Python‎ > ‎

integer

http://www.adilwaseem.com/

Introduction
Convert a number or string to an integer.

Syntax
int(x=0) -> integer
int(x, base=10) -> integer

Parameters
numbers

Examples
Int()
Return with the value.
 >>> int(33)
33

__float__
The method convert int() value to float.
 >>> int(33).__float__()
33.0

__round__
The method round the decimal.
 >>> int(33.33).__round__()
33

__abs__
The method come up with absolute value.
 >>> int(-33.22).__abs__()
33

__add__
The method add the int() to number.
 >>> int(99.1).__add__(22)
121

__eq__
The output is True in __eq__ test.
 >>> int(abs(-81)).__eq__(9*9)
True
>>>