Technology Learning

导航

2013年8月15日

python 核心编程课后练习(chapter 6)

摘要: 6-1 1 #6-1 2 3 #help(string) 4 import string 5 6 str = "helloworld" 7 substr = "h1e" 8 9 if string.find(str, substr) != -1:10 print"substr=%s is part of %s" % (substr, str)11 else:12 print"not substring" View Code 6-2 1 #6-2 2 import string 3 import keyword 4 阅读全文

posted @ 2013-08-15 19:26 浔阳渔夫 阅读(429) 评论(0) 推荐(0) 编辑