Python学习笔记(5)字符串操作
摘要:
1. 重复输出字符串 >>> print('x' * 20) xxxxxxxxxxxxxxxxxxxx 2. 通过索引获取字符串 >>> print('hello world'[2:5]) llo 3. in 判断字符是否在字符串内 >>> print('e' in 'hello world') T 阅读全文
posted @ 2018-04-08 15:28 童话与海 阅读(667) 评论(0) 推荐(0)