-1

Solve="30+05" Print(eval(Solve))

#This shows leading zero error #i want the Solve variable to be like Solve="30+5"

Anshul
  • 1

1 Answers1

0
solve="30+05" 
stripped_solve = "+".join([num.lstrip("0") for num in solve.split("+")])
print(eval(stripped_solve))
IrinMoon
  • 21
  • 2