I'm surprised that someone who couldn't say what type a python expression returns could do well on "show me things you've built", "tell me how this function you built works". Do you have an expalanation/guess? Were they giving you rehearsed answers to specific code that, well, they didn't necessarily actually build themselves?
You definitely can but it's not easy. These people are really good at bullshitting, that's why you have to back them into a corner. The simplest way to do that is to have them prove, live in the interview, that they can write code.