Skip to content

Instantly share code, notes, and snippets.

@rswofxd
Created March 23, 2012 13:25
Show Gist options
  • Save rswofxd/2170595 to your computer and use it in GitHub Desktop.
Save rswofxd/2170595 to your computer and use it in GitHub Desktop.
List序列操作
# -*- coding:utf-8 -*-
args = [3,6]
list(range(*args)) #‘*’用于拆分列表关键字参数操作符
#>>>[3,4,5]
def fun(a,b=3,c,d='hello'):
.......
h = {fr:7,tw:8,th:'world',fo:'hello'}
>>>fun(**h) #‘**’用于拆分字典关键字参数操作符
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment