Problem:
How can I add x.replace(".0",".") to the function rem0.
I need to have two yield statements, but can only get one of them working.
def rem0(data):
for x in data:
yield x.lstrip('0')
lGrid = []
for i in rem0(grid):
lGrid.append(i)
Using the following construct will solve your problem.