Query if modifier exists on listed objects I'm new to Blender and the way it works with Python, so I still don't understand quite well the way the different commands work.

But I wanna create a small tool where i can assign a modifier to a list of selected objects and play with the properties.
So far I achieved adding the modifier to the selected objects, but if I happen to create new elements and select all objects in the scene I need to find a way to query which objects already have the modifier and which do not. So if I run the script again, only the ones without the modifier get it, otherwise it gets duplicated.  

So far I haven't been able to find a way to do this using  bpy.context.selected_objects , I don't know if there is another way or if i'm using it wrong.

Here's the script i have to apply the modifier:

import bpy

objSel = bpy.context.selected_objects 

for i in objSel:
   if i.type == "MESH":            
      subD = i.modifiers.new(name = "Subdivisions",type = 'SUBSURF') 
      subD.show_only_control_edges = True


Any help is appreciate it!
You can access each objects modifiers as a dictionary by Object.modifiers. Then simply check if the name or type of your modifier is part of modifier collection (Modifier.name/Modifier.type) otherwise add a new modifier using ObjectModifiers.new() method:

import bpy

mod_name = "Subdivision"

for obj in bpy.context.selected_objects:  # Prefer using explicit variable names. Generally, i is used for counters, not objects
   if obj.type == "MESH" and mod_name not in obj.modifiers:         
      sub_div = obj.modifiers.new(name=mod_name, type='SUBSURF') 
      sub_div.show_only_control_edges = True 


Related: Check if active object has a modifier