Home > Article > Backend Development > How to print an inverted triangle in python
Inverted triangle in Python can be implemented using a for loop:
for i in range(6): print("") for j in range(0,6-i): print("*",end=" ") print("\n")
For more Python related technical articles, please visit PythonTutorial column to learn!
The above is the detailed content of How to print an inverted triangle in python. For more information, please follow other related articles on the PHP Chinese website!