If you use a buffer of bytes to share strings between C (or C++) and Python, you may end up with weird results, because both languages do not represent strings the same way.
I got bitten lately and here is what I have learnt.
C strings
If you have used C to handle strings once in your lifetime, then you have run into one of the most painful things in C: null-terminated strings 😑