在C ++中,我可以这样做:
for (int i = 0; i < str.length(); ++i)
std::cout << str[i] << std::endl;
我如何迭代Python中的字符串?
相似问题