So I have experience in other programming languages, but this seemingly simple task is getting the better of me. All I want to do is swap one object with another, the position, the rotation and the scaling.

I came up with this:

```
import bpy;
ob1 = bpy.context.selected_objects[0];
ob2 = bpy.context.selected_objects[1];
location = ob1.location;
rotation = ob1.rotation_euler;
scale = ob1.scale;
location2 = ob2.location;
rotation2 = ob2.rotation_euler;
scale2 = ob2.scale;
ob2.location = location;
ob2.rotation_euler = rotation;
ob2.scale = scale;
ob1.location = location2;
ob1.rotation_euler = rotation2;
ob1.scale = scale2;
```

Store the first 2 selected object’s properties and then assign them to each other. But whatever I do one object will move and scale etc but the other will stay just where it is e.g. using 2 cubes would result in 2 cubes in exactly the same place, with same rotation and scale. I feel I must be doing something obviously stupid, so any help is appreciated.

Thanks.