Skip to content

Instantly share code, notes, and snippets.

View debashish-ghosh's full-sized avatar

Debashish Ghosh debashish-ghosh

View GitHub Profile
a = [1, 2, 3, 4]
b = 'hello'
for x, y in zip(a, b):
print(x, y)
# prints
# 1 h
# 2 e
# 3 l
# 4 l
lst = [1, 2, 3, 4, 5]
for e in lst:
print(e)
@debashish-ghosh
debashish-ghosh / range-for.cxx
Created January 30, 2022 10:04
Range-based for-loop example
vector v{1, 2, 3, 4, 5};
for (auto &e : v)
cout << e << endl;