Python's zip function does the following:
zip
a = [1, 2, 3] b = [6, 7, 8] zipped = zip(a, b)
result
[[1, 6], [2, 7], [3, 8]]
How about this?
C# 4.0 LINQ'S NEW ZIP OPERATOR
public static IEnumerable<TResult> Zip<TFirst, TSecond, TResult>( this IEnumerable<TFirst> first, IEnumerable<TSecond> second, Func<TFirst, TSecond, TResult> func);
2.1m questions
2.1m answers
60 comments
57.0k users