If I want to move a sprite based on key input in pygame, is there anyway to write code so if I hold down a key, the sprite will keep moving in that direction until I release
You normally use have a moving function in your update method that looks like this:
this.pos_x = direction * speed * delta
Now on your KEYDOWN events you set your direction to 1 or -1 and on KEYUP you set it back to 0. That way you have a nice constant movement.