How to duplicate object using Python

Hello I’m trying to copy object using this code

ob = bpy.data.objects.get(house_name)
ob_dup = ob.copy()
ob_dup = ob.data.copy()

but it just creates orphan mesh and not shows in scene, does anyone know why is it happening and how to fix it to work? I tried searching web for answer but couldn’t find any help with my problem so now Im here

https://blender.stackexchange.com/questions/45099/duplicating-a-mesh-object

you have to add the object you copied to a scene collection:

bpy.context.scene.collection.objects.link(ob_dup)