rows = input("Enter maximum stars you want display on a single line: ")
rows = int (rows)
for i in range (0, num_rows):
    for j in range(0, i + 1):
        print("* ", end='')
    print("\r")
for i in range (num_rows, 0, -1):
    for j in range(0, i -1):
        print("* ", end='')
    print("\r")
     
           
Note: Need to be arranged in compiler after copied
   

 OutPut:

Enter maximum stars you want display on a single line: 5
*
* *
* * *
* * * *
* * *
* *
*