How can I list all the matcaps and studio lights via python?
What you are seeing is the string representation of a blender class instance, for example the context scene object.

&gt;&gt; str(C.scene)
'&lt;bpy_struct, Scene("Scene")&gt;'


In this case an object of type bpy.types.StudioLight
Of particular interest the  name and type property.

&gt;&gt;&gt; for sl in C.preferences.studio_lights:
...     sl.name, sl.type
...     
('Default', 'STUDIO')
('basic_1.exr', 'MATCAP')
('basic_2.exr', 'MATCAP')
('basic_dark.exr', 'MATCAP')
('basic_side.exr', 'MATCAP')


For example to make a dictionary with the type as the key to a list of the names of all of that type:

&gt;&gt;&gt; from collections import defaultdict
&gt;&gt;&gt; studio_lights = defaultdict(list)
&gt;&gt;&gt; for sl in C.preferences.studio_lights:
...     studio_lights[sl.type].append(sl.name)
...     


What types are there?

&gt;&gt;&gt; studio_lights.keys()
dict_keys(['STUDIO', 'MATCAP', 'WORLD'])


All those of type 'MATCAP'

&gt;&gt;&gt; studio_lights['MATCAP']
['basic_1.exr', 'basic_2.exr', 'basic_dark.exr', 'basic_side.exr', 'ceramic_dark.exr', 'ceramic_lightbulb.exr', 'check_normal+y.exr', 'check_reflection.exr', 'check_rim_dark.exr', 'check_rim_light.exr', 'clay_brown.exr', 'clay_muddy.exr', 'clay_studio.exr', 'jade.exr', 'metal_anisotropic.exr', 'metal_carpaint.exr', 'metal_lead.exr', 'metal_shiny.exr', 'pearl.exr', 'resin.exr', 'skin.exr', 'toon.exr']