def remove_items(garbages):
    """
    Removes the items/garbages that are no longer visible on the screen.

    Args:
        garbages(list): A list containing the garbage rects

    Returns:
        garbages(list): A list containing the garbage rects
    """
    for garbage_rect in garbages:  # Loop through all the garbage_rect's
        if garbage_rect.centerx <= -50:  # Checks if the center is out of the screen
            garbages.remove(garbage_rect)  # Remove the garbage item

    return garbages