0
Why??
What is the purpose of converting strings to integers isn’t it simpler to just say >>>print(3+4) 7 Then >>> print(int(“3”) + int(“4”)) 7
2 Respuestas
+ 11
Converting strings to integers is useful when getting user input:
x = int(input())
y = int(input())
print(x + y)
+ 5
The example is just there to show you how to convert string to integer values so that you can add them. There's no practical reason for you to write the latter over the former, if you just want to add two numbers.