[Solved] Identation Error


Your code, properly indented, should look like this:

def update_bullets(bullets):
"""Update position of bullets and gets rid of old bullets"""
    #Update bullet position
    bullets.update()

    # Get rid of bullets that had dissapeared
    for bullet in bullets.copy():
        if bullet.rect.bottom <= 1:
            bullets.remove(bullet)
        print(len(bullets))

Python code requires proper indentation at all times. Whitespace matters (unlike C)!

I would recommend checking out this tutorial for a basic tutorial on Python.

1

solved Identation Error