I've read numerous posts on this, and I realise lots of people have asked this, but I can't understand what I'm doing wrong. I'm trying to draw a grid with coordinates for a project I'm working on, and I was trying some code for generating it. I tryed this one, but I keep getting that error. What's wrong with the code? I've tryed different indentations but it doesn't work.
stepsize = 0.001
for x in range(0, 10, stepsize):
for y in range(0, 10, stepsize):
yield (x,y)
How can I generate a regular geographic grid using python?
^^The original q+a
Thanks to everyone who helped, I'm not sure why that code was posted considering it wouldn't work anyway! Sorry for my misunderstanding, I haven't used generators before. :)