I know very little on Python, but I'm quite experienced in C++. I was looking for an algorithm that would loop through the points in a hexagon pattern and found one written in Python that seems to be exactly what I need. The problem is that I have no idea how to interpret it.
Here is the Python code:
for x in [(n-abs(x-int(n/2))) for x in range(n)]:
for y in range(n-x):
print ' ',
for y in range(x):
print ' * ',
print
I'd show you my attempts but there are like 30 different ones that all failed (which I'm sure are just my bad interpretation).