摘要: 1.print(str[0:-1])如上图所示,str[0:-1]为切片,意思是从前面开始截取到后面-1为止,所以输出第一个到倒数第二个的所有字符 str = "abcdef" print(str[0:-1]) 输出:abcde 2.print(str[2:5])如上图所示,str[2:5]从2开始 阅读全文
posted @ 2020-10-29 14:09 sgggr 阅读(418) 评论(0) 推荐(0) 编辑
摘要: 简单来说: Unicode 是「字符集」 UTF-8 是「编码规则」 https://www.zhihu.com/question/23374078 阅读全文
posted @ 2020-10-29 13:52 sgggr 阅读(81) 评论(0) 推荐(0) 编辑