You may have already seen how to get a string and convert it to int in the Computer–micro:bit Talk [1] tutorial. Here, the int result after calculations is also converted back to a string.
# convert_your_turn from microbit import * sleep(1000) s = "1234" print("Before int conversion:") print("s =", s) print() n = int(s) # convert to int n2 = n + n # add s2 = str(n2) # convert back print("After convert, add ints, convert back:") print("s2 =", s2)
Links
[1] https://learn.parallax.com/tutorials/robot/cyberbot/computer-microbit-talk