Converting with int() and float()
Predict the outputMediumPython only
print(int("42") + 1)
print(int(3.99), int(-3.99))
print(float("1e3"))
print(int("ff", 16), int("010"))
print(int(" 7 "))
This question is part of Pro+
Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.