I'm looking for a way to access an object multiple times in an easy way.
Ex. 1)
ls = [i for i in range(100)]; print(ls[0], ls[32], ls[95])
Ex. 2)
js = {'key0': 'val0', ...}; print (js['keyN'], js['keyM'])
What I'm looking for is a way to only specify the object once, and then specify the wanted indices (something like slice). Meaning ls[0,32,95]
, or js['keyN][inner_keyN_M, innerkeyN_M+3]