How to insert a doctype while inserting anther doctype

Hi,
How to insert a doctype values while inserting another using python code.
I am inserting tablex on save button, on that save i need to insert a tabley .
Thank you …!

Thank you…!
Solved …!