Nokia interview question

Inverse binary tree with help of python code