converting particle systems

I am very new to blender scripting.

I want to convert hair particle systems.
But this code does not work.
How can I get it to work?

import bpy
for i in[‘Cube’].particle_systems.values():

I think I need to get modifier name.

I made a little progress.

There is a Cube object with two hair systems.
Select the Cube and then

import bpy
hairSystems =[‘Cube’].modifiers.keys()

for hair in hairSystems:
bpy.ops.object.modifier_convert(modifier= hair)

But this converts only the first hair system.
I think I need to select the Cube for every conversion.

But this does not work.[‘Cube’].select = 1

The Cube becomes dark orange.
Not bright orange as usual and I guess this is the problem.
Is there other ways to select objects?
Or is there a better way to convert hair systems?