n | def squares(w, h, *squer): | n | def squares(w, h, *args): |
| answer = [['.' for i in range(w)] for j in range(h)] | | l = [['.' for j in range(w)] for i in range(h)] |
| for i in squer: | | for a in args: |
| for d in range(i[0], i[0] + i[2]): | | for i in range(a[1], a[1] + a[2]): |
| for f in range(i[1], i[1] + i[2]): | | for j in range(a[0], a[0] + a[2]): |
| answer[f][d] = i[3] | | l[i][j] = a[3] |
| for i in range(h): | | for i in range(h): |
| for j in range(w): | | for j in range(w): |
t | print(answer[i][j], end='') | t | print(l[i][j], end='') |
| print() | | print() |