└── Recursive triangle in python /Recursive triangle in python: -------------------------------------------------------------------------------- 1 | def print_triangle(n, current=1): 2 | if current > n: 3 | return 4 | print('*' * current) 5 | print_triangle(n, current + 1) 6 | 7 | # Set the number of rows 8 | n = 5 9 | print_triangle(n) 10 | --------------------------------------------------------------------------------