Skip to content

Instantly share code, notes, and snippets.

@shihongzhi
Created February 18, 2011 10:31
Show Gist options
  • Save shihongzhi/833513 to your computer and use it in GitHub Desktop.
Save shihongzhi/833513 to your computer and use it in GitHub Desktop.
#http://stackoverflow.com/questions/5037187/formatted-input-in-python/5040181#5040181 题解
f=open("x.txt")
d={}
flag=False
for l in f.readlines():
if not flag:
num=(len(l)-1)/2
flag=True
continue
for i in range(num):
d[chr(65+i)+l[0]]=l[(i+1)*2]
print d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment