1 Answers
By using this code you can convert string type value into integer.
a = int(x)
Where, x is string which i am converting to integer.
Let’s see one example.
x = input(“Enter 1st number”)
a = int(x)
y = input(“Enter 2nd number”)
b = int(y)
z = a + b
print(z)
By using this,
a = int(x)
b = int(y)
You can convert string value into integer.