Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def pyramid(param:int):
- result = []
- for i in range(param):
- arrrrrrrrrrrrrrrrrrrrrrrrr=[]
- for f in range(param-i):
- arrrrrrrrrrrrrrrrrrrrrrrrr.append(1)
- result.append(arrrrrrrrrrrrrrrrrrrrrrrrr)
- result.reverse()
- return result
- print(pyramid(0))
- print(pyramid(1))
- print(pyramid(2))
- print(pyramid(3))
- print(pyramid(4))
Advertisement
Add Comment
Please, Sign In to add comment