zip.dict: Combine 2 lists into a dict of key/values

Description Usage Arguments Examples

Description

Takes 2 lists and converts them into a key => value mapping, which takes the form of a dict.

Usage

1
  zip.dict(x, y)

Arguments

x

a list, vector, or list.py

y

a second list, vector, or list.py

Examples

1
2
3
4
5
6
x <- list.py(1, 2, 3)
y <- list.py("a", "b", "c")
zip.dict(x, y)
#{1: 'a', 2: 'b', 3: 'c'}
zip.dict(y, x)
#{'a': 1, 'b': 2, 'c': 3}

yhat/structr documentation built on May 4, 2019, 2:33 p.m.