This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# United States of America Python Dictionary to translate States, | |
# Districts & Territories to Two-Letter codes and vice versa. | |
# | |
# Canonical URL: https://gist.github.com/rogerallen/1583593 | |
# | |
# Dedicated to the public domain. To the extent possible under law, | |
# Roger Allen has waived all copyright and related or neighboring | |
# rights to this code. Data originally from Wikipedia at the url: | |
# https://en.wikipedia.org/wiki/ISO_3166-2:US | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const zip = (arr, ...arrs) => { | |
return arr.map((val, i) => arrs.reduce((a, arr) => [...a, arr[i]], [val])); | |
} | |
// example | |
const a = [1, 2, 3]; | |
const b = [4, 5, 6]; | |
const c = [7, 8, 9]; |