1# test calling a function with *tuple and **dict
2
3def f(a, b, c, d):
4    print(a, b, c, d)
5
6f(*(1, 2), **{'c':3, 'd':4})
7f(*(1, 2), **{['c', 'd'][i]:(3 + i) for i in range(2)})
8
9# test calling a method with *tuple and **dict
10
11class A:
12    def f(self, a, b, c, d):
13        print(a, b, c, d)
14
15a = A()
16a.f(*(1, 2), **{'c':3, 'd':4})
17a.f(*(1, 2), **{['c', 'd'][i]:(3 + i) for i in range(2)})
18