我是python的初学者,
我有此错误:
unindent does not match any outer indentation level (<unknown>, line 24)
这是我的代码:
import pygame
#get screen
screen = pygame.display.set_mode((800, 600))
#Set title and logo
pygame.display.set_caption('Space Invaders')
icon = pygame.image.load('spaceship.png')
pygame.display.set_icon(icon)
#Running
running = True
while running:
import pygame
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
screen.fill((155 , 0, 0))
pygame.display.update()
我试图用颜色填充屏幕,但始终出现以上错误。请帮助我解决此问题。