How to shoot a moving object with hitboxes? IndexError: list index out of range Python 3.5.2 : I'm new to coding and I'm recreating space invaders for a school project. I've ran into a problem trying to get the bullet to hit one of the enemies to add and add score. I get the error "IndexError: list index out of range".

Here's a simplified version of my game that recreates the problem:

    import pygame, sys
    from pygame.locals import *
    import math
    
    pygame.init()
    FPS=30
    fpsClock = pygame.time.Clock()
    screen = pygame.display.set_mode((628, 602),0,32)
    
    FILL=(0,162,232)
    BLACK=(0,0,0)
    
    font=pygame.font.Font('freesansbold.ttf',22)
    mothership=pygame.image.load('mothership.png').convert()
    mothership.set_colorkey(FILL)
    bullet=pygame.image.load('bullet.png').convert()
    player=pygame.image.load('player.png').convert()
    player.set_colorkey(FILL)
    
    
    def drawbullet(bulletx,bullety):
         screen.blit(bullet,(bulletx,bullety))
    def drawplayer():
         screen.blit(player,(playerx,playery))
    def drawmothership(mothershipx,mothershipy):
         screen.blit(mothership,(mothershipx,mothershipy))
    
    bulletx=[]
    bullety=[]
    score=0
    mothershipx=-30
    mothershipy=200
    playerx=84
    playery=483
    firing=False
    
    while True:
        screen.fill(BLACK)
        drawplayer()
        drawmothership(mothershipx,mothershipy)
        mothershipx=mothershipx+7
    
        message=''+str(score)+''
        text=font.render(message,True,FILL)
        screen.blit(text,(143,59))
    
        if mothershipx>=628:
            mothershipx=-30
        for l in range(len(bulletx)):
            drawbullet(bulletx[l],bullety[l])
            bullety[l]=bullety[l]-10
    
        if math.hypot((bulletx[1]-mothershipx),(bullety[1]-mothershipy))<100:
            score=score+10
    
    
        pygame.display.update()
        for event in pygame.event.get():
                if event.type==QUIT:
                    pygame.quit()
                    sys.exit()
    
        keys=pygame.key.get_pressed()
        if keys[K_LEFT] and playerx>0:
          playerx=playerx-5
        if keys[K_RIGHT] and playerx<583:
          playerx=playerx+5
        if event.type==KEYDOWN:
          if event.key==K_SPACE:
               firing=True
               firinglocationx=playerx+20
               bulletx.append(firinglocationx)
               bullety.append(483)
        fpsClock.tick(FPS)

Any help would be appreciated, thanks.