Python Check If Variable Contains String In C