Sleep inside a loop

Hi!
I import several planes containing png images, which are transparent, e.g.(n times):

bpy.ops.import_image.to_plane(files=[{“name”:“name1.png”, “name”:“name1.png”}], directory=“C:\Users\Owner\Desktop\Folder\”, filter_image=True, filter_movie=True, filter_glob="", relative=False)
bpy.ops.transform.resize(value=(4, 1, 2), constraint_axis=(True, False, False), constraint_orientation=‘GLOBAL’, mirror=False, proportional=‘DISABLED’, proportional_edit_falloff=‘SMOOTH’, proportional_size=1)
bpy.ops.transform.resize(value=(1, 6, 2), constraint_axis=(False, True, False), constraint_orientation=‘GLOBAL’, mirror=False, proportional=‘DISABLED’, proportional_edit_falloff=‘SMOOTH’, proportional_size=1)
bpy.context.object.delta_location[2] = 2
bpy.context.object.active_material.use_transparenc y =1
bpy.context.object.active_material.alpha = 0.2
bpy.data.images[“name1.png”].use_alpha= 1

name2

name3

name4

etc

Then, I select each image and move it, like:

ob=bpy.data.objects
for i in range(0,3):
if ob[i]==bpy.data.objects[‘name1’]:
ob[i].select = True
ob[i].location.y -= 8
time.sleep(3)
if ob[i]==bpy.data.objects[‘name2’]:
ob[i].select = True
ob[i].location.y += 3.5
time.sleep(3)
if ob[i]==bpy.data.objects[‘name3’]:
ob[i].select = True
ob[i].location.y -= 3.5
time.sleep(3)
if ob[i]==bpy.data.objects[‘name4’]:
ob[i].select = True
ob[i].location.y -= 8
time.sleep(3)

This selects and changes the location of the images,but time.sleep(i) works only after the loop ended.
How can I make it work inside a loop?
Or is there a solution not using loops?
Thanks