I'm a beginner and I just want to set the location, rotation, and scale of the object. I tried to get code by reverse engineering but when I moved, rotated, and scaled my object I saw complicated code.
if you want to get exact code you shouldn't change transform in view port. when you change the transform in this panel it works:
import bpy obj = bpy.context.object obj.location = (0,0,0)
import bpy import math obj = bpy.context.object obj.rotation_euler = (0,math.radians(90),0)
import bpy obj= bpy.context.object obj.scale = (1,1,1)