pattern in list python code example
Example 1: * pattern program in python
def pattern(n): for i in range(0,n): for j in range(0, i+1): print("* " , end="") print("\r") pattern(5)
Example 2: * pattern by python
def pattern(n):
for i in range(0,n):
for j in range(0, i+1):
print("* " , end="")
print("\r") pattern(5