Print a list of available joysticks

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()))