>>> botloc="28,20"
>>> botX,botY = map(int,botloc.split(','))
>>> botX,botY
(28, 20)
If you wanted to store multiple bot locations you could do this:
>>> botLocations = []
>>> botLocations.append(map(int,botloc.split(',')))
>>> botLocations
[[28, 20]]
Where each time yout get a new botloc
you split it by commas, convert each value seperated into an int, and store it inside botLocations.
botloc[:len(botloc)/2], botloc[len(botloc)/2:]
Wouldn't work if botLoc was uneven i.e 198,2
. Instead you would have to do something like
>>> botloc="28,20"
>>> botloc[:botloc.index(',')]
'28'
>>> botloc[botloc.index(',')+1:]
'20'
To seperate the string.