I want to convert an RLE, or Run-length encoding file into a list of coordinates which represent live cells like this: [(x,y),(x,y),(x,y)] I tried reading this but it didn't really explain how to do what I want. how can I do this?
here is an example:
obo$b2o$bo! -> [(0,0),(1,1),(1,2),(0,2),(2,1)]
没有评论:
发表评论