Can someone tell me if it is possible to run a python code directly in GNUradio?

Can someone tell me if it is possible to run a python code directly in
GNUradio?

Your question is a little vague.
You might want to read the guided tutorials, chapter 1-3:
https://gnuradio.org/redmine/projects/gnuradio/wiki/Guided_Tutorials