<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def list_joysticks():
    '''Print a list of available joysticks'''

    print('Available joysticks:')
    print()
    for jid in range(pygame.joystick.get_count()):
        j = pygame.joystick.Joystick(jid)
        print('({}) {}'.format(jid, j.get_name()))