Procedure:
def method(a,*b,**c): #b is a list while c is a dictionary element
print a
print b
for (key, value) in c.items():
print "%s = %s" %(key,value)
Call:
method(1,2,3,4,5,x='Linux',y='XP')
output:
1 ###a
(2, 3, 4, 5) ###b
y = XP ###c, And the order of elements in C is not fixed yet.
x = Linux
Make sure the key should not be quoted. If call the method in this way:
method(1,2,3,4,5,'x'='Linux','y'='XP')
This error message will show up:
SyntaxError: keyword can't be an expression