[ create a new paste ] login | about

Link: http://codepad.org/yd4zyhGA    [ raw code | output | fork | 1 comment ]

hudolejev - Python, pasted on Jun 1:
1
2
3
4
5
#!/usr/bin/env python

for row in range(6):
    out = "-".join(`num + 1` for num in range(row + 1))
    print out[::-1] if row % 2 else out


Output:
1
2
3
4
5
6
1
2-1
1-2-3
4-3-2-1
1-2-3-4-5
6-5-4-3-2-1


Create a new paste based on this one


Comments:
posted by hudolejev on Jun 1
reply