Код: Выделить всё
for(auto x: Y) {}
Код: Выделить всё
for(std::vector::iterator x=Y.begin(); x!=Y.end(); ++x) {}
Код: Выделить всё
Y1 = [1, 2, 3]
Y2 = [4, 5, 6, 7]
for x1,x2 in zip(Y1, Y2):
print(x1, x2)
Подробнее здесь: https://stackoverflow.com/questions/851 ... on-for-c11
Мобильная версия