When the object is in edit mode, I want to execute this:-
bpy.ops.object.modifier_add(type='SUBSURF")
And if the same object is in object mode, I want to execute this instead:-
bpy.ops.object.modifier_add(type='SOLDIFY')
I'm really confused about setting up the conditional operators regarding to the context of the object(modes). How do i it ?