print [int(m+n+m) for m in "123456789" for n in "0123456789"]
easy as this :)
easy as this :)
2015-10-08
d = { 'Adam': 95, 'Lisa': 85, 'Bart': 59, 'Paul': 74 }
sum = 0
for v in d.itervalues():
sum += v
print sum/(len(d))
sum = 0
for v in d.itervalues():
sum += v
print sum/(len(d))
2015-10-07
for x in range(1,10):
for y in range(0,10):
if x<y:
print x*10+y
for y in range(0,10):
if x<y:
print x*10+y
2015-10-07
L = range(1, 101)
print L[0:10]
print [x for x in L if (x%3==0)]
print [x for x in L if x>=5 and x<=50 and (x%5==0)]
这个才是正确的
print L[0:10]
print [x for x in L if (x%3==0)]
print [x for x in L if x>=5 and x<=50 and (x%5==0)]
这个才是正确的
2015-10-06
L = range(1, 101)
print L[0:10]
print [x for x in L if (x%3==0)]
print [x for x in L if x>=5 or x<=50 if (x%5==0)]
print L[0:10]
print [x for x in L if (x%3==0)]
print [x for x in L if x>=5 or x<=50 if (x%5==0)]
2015-10-06
L = [95.5,85,59]
print L[0]
print L[1]
print L[2]
print L[2]
这样提交的确能得分,话说本来的提交答案是不是搞错了啊?
print L[0]
print L[1]
print L[2]
print L[2]
这样提交的确能得分,话说本来的提交答案是不是搞错了啊?
2015-10-05