I have two strings variables:
data = "14.816,-83.828,14.878,-83.710,14.878,-83.628,14.918,-83.579,15.014,-83.503"
adata = "8.036,-82.900,8.109,-82.886,8.163,-82.909,8.194,-82.913,8.208,-82.936"
I want to split each variable data with a ,
but every two ,
and then take the result and add it to a list poly
.
At the end, I want my list like this:
poly = [(14.816,-83.828),(14.878,-83.710),(14.878,-83.628),(14.918,-83.579),(15.014,-83.503),(8.036,-82.900),(8.109,-82.886),(8.163,-82.909),(8.194,-82.913),(8.208,-82.936)]
Is there any easy way to do this in python?