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

def list_joysticks ( ) : print ( 'Available joysticks:' ) print ( ) for jid in range ( pygame . joystick . get_count ( ) ) : j = pygame . joystick . Joystick ( jid ) print ( '({}) {}' . format ( jid , j . get_name ( ) ) )
print a list of available joysticks .