Be concise.
Be useful.
All contributions dictatorially edited by webmasters to match personal tastes.
Please do not paste any copyright violating material.
Please try to avoid dependencies to third-party libraries and frameworks.
a = 'abc xyz'.split()
for i, v in enumerate(a):
print(i, v)
a = %w(abc xyz)
a.map.with_index{|v, i| [i, v] }