draw pyramid shape python

Solutions on MaxInterview for draw pyramid shape python by the best coders in the world

showing results for - "draw pyramid shape python"
Matteo
20 Aug 2019
1# Python 3.x code to demonstrate star pattern
2 
3# Function to demonstrate printing pattern
4def pypart(n):
5    myList = []
6    for i in range(1,n+1):
7        myList.append("*"*i)
8    print("\n".join(myList))
9 
10# Driver Code
11n = 5
12pypart(n)
13