I'm not sure what a certain code line does
Question: I was trying to have a program using Python to create a "pyramid" based on a
number, n, out of o's and came up with this: ( I would print nn, that would be
the lines.)

    
    
    import time
    
    n = 0
    while True:
        n += 2 #just another way to show n=n+2
        nn = n, "o" #nn would be an amount of o's, based on what #n was
        time.sleep(1)
        print (nn, str.center(40, " "))
    

Not sure how to make nn the o's and not sure what line 6 does either. Does
anyone know the answer to either question? ( I'm not in a class just
programming for fun.)


Answer: 
    import time
    
    n = 0
    while True:
        n += 2 #just another way to show n=n+2
        nn = "o" * n #nn would be an amount of o's, based on what #n was
        time.sleep(1)
        print (nn.center(40," "))
    

As someone has mentioned in the comments "o" * n will give a a string
containing n "o"s. I've fixed the print line to use the correct method a
calling the center method.

