标签: python ctypes
a = ((c_char*2)*2)(('a','b'),('c','d')) a Out::<__main__.c_char_Array_2_Array_2 at 0x47da8c8> b = [cast(i, c_char_p) for i in a] b Out::[c_char_p('abcd'), c_char_p('cd')]
如何正确迭代以获得输出
Out::[c_char_p('ab'), c_char_p('cd')]