I'm writing my first program. I've been using python3 to do so. I've run into a problem that I think is so basic I can't find the answer discussed anywhere, or maybe I'm just too dense to see it. thank you for your patience with my inexperience.
combinations ('gimp', 2) returns
[('g', 'i'), ('g', 'm'), ('g', 'p'), ('i', 'm'), ('i', 'p'), ('m', 'p')]
I want these to be Cartesian coordinates, so I've done this...
(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,x) = range(17)
in hopes that the letters will be switched with numbers, but the pesky (')'s around the letters prevent that.
How can I get the list to be more like?
[(g,i),(g,m)...]
I've tried using the replace function without luck
combo.replace("'","")
or if there's a more straight forward way to turn a list of the combinations off lettered pairs into coordinates I'd love to know it.
Thank you in advance for your help.