sorry but this is probably a stupid question but;
if you have an input like
pos = 'c3'
#and you want to take out the second character as an int what do you need to add to stop it from producing an error if the second character is a letter
eg. pos = 'cd'
# i've been using
int(pos[1]) # but it gives an error when the [1] is a letter not a number.
if you have an input like
pos = 'c3'
#and you want to take out the second character as an int what do you need to add to stop it from producing an error if the second character is a letter
eg. pos = 'cd'
# i've been using
int(pos[1]) # but it gives an error when the [1] is a letter not a number.
Comment