Weird syntax error


#1


My while loop isn't working correctly for a seemingly simple operation... could someone tell me why?

I expected the while loop to (pop()) the elements of the holder into the rev_holder but I get stuck at the while loop error stage.


def reverse(text):
    holder=[]
    for i in range(0, len(text)):
        holder.append(text[i])
    rev_holder=[]
    #print len(rev_holder)
    while len(holder) > 0
        rev_holder.append(holder.pop())
    print rev_holder
        
reverse('string')


#2

Missing : to start the block.

Did you know that we can convert a string to a list with list function?


#3

god I am so stupid for not having realized that :open_mouth: thanks for the prompt response !


#4

It happens to everyone. Don't be hard on yourself.