Skip to content

Instantly share code, notes, and snippets.

View lll9p's full-sized avatar

Lilin Lao lll9p

View GitHub Profile
# https://www.zhihu.com/question/50356943/answer/120946800
A = [1, [2, 3, [2, 3]], [4, 5, 6], 7]
B = [2, 3, 4, 5, 6, 7, 8, 2, 3]
# 1行版
result = (lambda f: list(map(f(f), A)))((lambda iB: (lambda g: (lambda a: isinstance(a, list) and list(map(g(g), a)) or next(iB))))(iter(B)))
print(result)
# 3行版
# https://www.v2ex.com/t/298833
from xx import my_get_s
ss = [int(my_get_s()) for i in range(3)]
# dict version
conds = ({1: 1, 2: 2, 3: 5, 4: 9, 5: 7, 6: 8, }, # x
{1: 1, 2: 6, 3: 6, 4: 8, }, # y
{1: 8, 2: 5, 3: 2, 4: 7, 5: 3, }, # z
)
x, y, z = map(lambda d, s: d.get(s, -1), conds, ss)

Keybase proof

I hereby claim:

  • I am lll9p on github.
  • I am lll9p (https://keybase.io/lll9p) on keybase.
  • I have a public key whose fingerprint is 8E7B 320A EB33 6629 050A 8FDD 70C7 FA72 936D 4D61

To claim this, I am signing this object:

Bundle 'gmarik/vundle'
Bundle 'AuthorInfo'
Bundle 'mru.vim'
"Bundle 'taglist.vim'
Bundle 'TaskList.vim'
Bundle 'vimwiki'
Bundle 'VimIM'
Bundle 'python.vim--Vasiliev'
Bundle 'DrawIt'
" Games
原帖地址: http://topic.csdn.net/u/20110113/19/b0d5d506-4307-428b-a61d-7974aa66a2da.html
首先要说明的是:这里介绍的方法都是大部分是本人“悟”出来的,所以网上难有流传!
好方法不能自己私藏,否则就白忙乎这几天了,分享给有需要的朋友们。如果有转载,敬请注明来自*CSDN老邓*作品。
呵呵,给自己打广告,实在是无耻之极,权当无聊之时打字之用。
欢迎流传,为最优秀的分布式版本管理系统Git做宣传!!
步骤:
1. 下载:http://loaden.googlecode.com/files/gitconfig.7z
2. 解压到:<MsysGit安装目录>/cmd/,例如:D:\Program Files\Git\cmd