Star Pyramid Pattern using One Line Python Code
In this tutorial, we are going to show How to print a star pattern using one line of python code. We have added the video tutorial and the source code of the program.
Video Tutorial: Star Pyramid Pattern using One Line Python Code
Source Code
# One Liner Star Pattern Python Code print('\n'.join('* ' * i for i in range(1,6)))
Also Read: Python program to create BMI calculator
Output
Also Read: How to run python in visual studio code
Join Now: Learn Python Programming Masterclass