টাইপ কনভার্সন
# String to Integer Conversion
>>> int("123")
123
# float to Integer Conversion
>>> int(12.3)
12>>> int("123a")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: invalid literal for int() with base 10: '123a'# String to float Conversion
>>> float("123.456")
123.456
# Integer to float Conversion
>>> float(123)
123.0Last updated