Advertisement
here2share

# print_pattern.py

Aug 1st, 2024 (edited)
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.14 KB | None | 0 0
  1. # print_pattern.py
  2.  
  3. w=9
  4. for i in range(w):
  5.   cond=[0,i,w-1-i,w-1]
  6.   t=""
  7.   for j in range(w):
  8.     t+="* " if j in cond else "  "
  9.   print(t)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement