How to kill zombie and orphan processes in Linux

Lets understand what are zombie and orphan processes in linux and using python lets create and delete them.