Python How Can I Make a Counter To Cycle Through a Dictionary Inside a For Loop?
Question: I have just started coding and don't know much about it. This is my bit of
code that tries to cycle through numbers from the for loop to assign num1 and
num2. Instead it make a new one called num0. WHAT?!

    
    
    import random
    numbers = {'num1': '', 'num2': ''}
    
    counter = 0
    for i in range(0, 2):
        number = random.randint(0, 5)
        counter + 1
        numbers['num' + str(counter)] = number;
    
    print(numbers)
    


Answer: `counter + 1` isn't assigned to anything. You have to do `counter += 1`.
`counter + 1` returns a new number but doesn't assign it to anything. `counter
+= 1` returns a new number _counter + 1_ and assigns it to the variable
_counter_. It's the same as `counter = counter + 1`.

