python使用注意事项
摘要:
1. find() 查找子串,类似的还有 index() / rindex() / rfind()。rxxx 表示找最后一个子串, index 在找不到时会触发异常。 >>> "abcdefg".find("d", 1, -1) 3 >>> "abcdefg".find("d", 1, -4) -1 >>> "aa1111aaa".rfind("aaa") 6 >>> "aa1111aaa&qu 阅读全文
posted @ 2008-12-26 11:09 starspace 阅读(203) 评论(0) 推荐(0) 编辑