Advertisement
Guest User

Untitled

a guest
Jul 25th, 2022
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. filled = "■"
  2. empty = "□"
  3.  
  4. def draw(prov):
  5.     ret = []
  6.     for _ in range(max(prov)):
  7.         data = []
  8.         for z in range(len(prov)):
  9.             if prov[z] > 0:
  10.                 data.append(filled)
  11.             else:
  12.                 data.append(empty)
  13.             prov[z] -= 1
  14.         ret.append(data)
  15.     return ret[::-1]
  16.  
  17.  
  18. for x in draw([1,2,3,3,2,1,1,2,3,4,5,6,7]):
  19.     print("".join(x))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement