Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
def diamond(width, offset):
for w in (range(1, width) + range(width, 0, -1))[::2]:
print " " * offset,
print " " * int((width - w) / 2),
print "x" * w
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.