How to check in a "for" cycle if an object is linked (User
Object.data.users returns the number of data-block users. Proof using the Console:

&gt;&gt;&gt; for ob in bpy.context.scene.objects:
...     print ("Object name:", ob.name, "- Users:", ob.data.users)

Object name: Cube - Users: 1
Object name: Light - Users: 1
Object name: Camera - Users: 1