Select items with negative scale value

Hey there!

I tried asking chatgpt but no working code for this :slight_smile:
I would like to ask for a code that:

-select items with negative scale value

(actually code should search in items with sufix ‘_kill’ but that part is (should) ok with ai :stuck_out_tongue:

import bpy
for o in bpy.context.view_layer.objects:
    if (o.scale.x<0 or o.scale.y<0 or o.scale.z<0) and o.name.endswith("_kill"):
        o.select_set(True)