- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
class list(list):
def __call__(self, *args):
if len(args) == 0:
return self[:]
res = []
for i in args:
if type(i) == int:
res.append(self[i])
else:
res.append(self(*i) if len(i) != 1 else [[[self(0)]]])
return res
a = list(map(lambda x: x * x, range(10)))
print(a(1,0,(6,6,(5,4,3,(0)),6),3,2,(),8,))