How do c++ and python communicate

How to use shared memory to communicate c++ and python, And how to verify that the communication between them is successful