好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

python 基础学习系列(一)

python 就是学就好啦,哈哈,菜鸟的python学习之路要开始了 python 的变量什么的,就先掠过,直接从字符串的学习开始 (1)字符串的索引(盗图菜鸟教程python)

在 python 中,字符串中的字符是通过索引来提取的,索引从 0 开始。 python 可以取负值,表示从末尾提取,最后一个为 -1,倒数第二个为 -2,即程序认为可以从结束处反向计数。 (2)字符串的格式化 first='John' last='Smith' messages=first+'['+last +']'+'is a coder' msg=f'{first}[{last}] is a coder' print(messages) print(msg)

查看更多关于python 基础学习系列(一)的详细内容...

  阅读:28次