How can I select the object using a sequence of letters in the name . I know there are operators endswith and starswith, they allocate objects to spell the end or the beginning . But how can I select an object if at the beginning and at the end of the characters are the same, but differ only in the middle of the name. For example, the operator selects the object name in the end:
for ob in bpy.context.visible_objects:
if ob.type == 'MESH' and ob.name.endswith("_P678GHNV"):
obs.add(ob)
ob.select = True
for example, my naming:
_Н480_2_ТХ_VALVE1_Linde_Clea
_Н480_3_ТХ_VALVE2_Linde_Clea
And I need to select the objects that include the VALVE in the name