Is it possible to convert a string of text into an integer/number?
-
For example test= "5"
Can the string "5" be converted into just 5? So that test will only hold 5 instead of "5" -
yes!
var = int("12")
-
Oh wow that's easy. Thanks!
-
@MikeDX as a follow up, does string() convert an integer into a string? And what is the propped syntax because it's telling me that function does not exist
-
Good guess!
The function you want is
str
myvar = str(1)