摘要:
#!/usr/bin/pythonab={ 'jack' : 'jack@1.com', 'ken' : 'ken@1.com', 'hellen' : 'hellen@1.com' }print 'jack address is %s' % ab['jack']ab['sten']='sten@1.com'del ab['ken']print '\nTHere are %d conntacts in the a 阅读全文
摘要:
练习List的使用。。有点旧,不过复习下,很多都掌握不牢固。。。#!/usr/bin/pythonshoplist=['apple','jack','banane']print 'shoplist have',for i in shoplist: print i,print '\ni buy the shop:kate'shoplist.append('kate')print '\nthe shoplist have:',for i in shoplist: print i,prin 阅读全文