2020年3月6日
摘要: 1 find()函数:找到返回对应字符的索引 返回-1表示未找到字符串 s = 'hello python apple' print(s.find('n')) print(s.find('5')) print(s.find('python')) #返回字符串第一个索引值 print(s.find(' 阅读全文
posted @ 2020-03-06 10:31 bug无处不在 阅读(326) 评论(0) 推荐(0) 编辑
摘要: 直接简单的输出#简单输出一个字符串 >>>print('hello python apple') hello python apple#简单输出多个字符串 >>>print('hello','python', 'apple')hello python apple #简单输出拼接字符串>>>print 阅读全文
posted @ 2020-03-06 10:07 bug无处不在 阅读(419) 评论(0) 推荐(0) 编辑