diff --git a/Python/pattern.py b/Python/pattern.py new file mode 100644 index 00000000..88090386 --- /dev/null +++ b/Python/pattern.py @@ -0,0 +1,12 @@ +# Python 3.x code to demonstrate star pattern + +# Function to demonstrate printing pattern +def pypart(n): + myList = [] + for i in range(1,n+1): + myList.append("*"*i) + print("\n".join(myList)) + +# Driver Code +n = 5 +pypart(n)