标签:led blog 参数 .exe int use code dell *args
#!/usr/bin/env python # -*- coding:utf-8 -*- def fun1( *args, **kwargs ): print( args, type(args) ) print( kwargs, type(args) ) fun1(12, ‘aa‘, 234, kk=1, nn=4) aa=[1, 2, 3, 4] b = {‘a‘: 1, ‘b‘: 2, ‘c‘: 3} fun1(*aa, **b)
C:\Users\DELL\AppData\Local\Programs\Python\Python35\python.exe I:/untitled1/b.py
(12, ‘aa‘, 234) <class ‘tuple‘>
{‘nn‘: 4, ‘kk‘: 1} <class ‘tuple‘>
(1, 2, 3, 4) <class ‘tuple‘>
{‘b‘: 2, ‘c‘: 3, ‘a‘: 1} <class ‘tuple‘>
标签:led blog 参数 .exe int use code dell *args
原文地址:http://www.cnblogs.com/y990441/p/6257688.html