Quick actions

cmd+k|ctrl+k

Navigation

Languages

Christmas Tree

Snippet info

Language

Python

Visibility

public

Author

thomas.vercamer

Created

2026-07-15T19:18:44.845322Z

Updated

2026-07-15T19:18:44.845322Z

picture = [
    [0,0,0,1,0,0,0],
    [0,0,1,1,1,0,0],
    [0,1,1,1,1,1,0],
    [1,1,1,1,1,1,1],
    [0,0,0,1,0,0,0],
    [0,0,0,1,0,0,0]
]

for line in picture:
    for pixel in line:
        if pixel == 0:
            print(' ', end='') # This end params keeps everything on the same line
        else:
            print('*', end='')
    print('') # At the end of each (picture) line, a newline should be started
INFO