- 博客(2)
- 收藏
- 关注
转载 python字符串的基本操作
# 字符串是python最常用的数据类型# 因字符串是不可变的,所以除分片赋值外的所有标准序列操作对字符串适用# temp1='just soso'# print temp1[-1:]# o# temp1=[-2]=y# print temp1# File "C:/Users/Administrator/PycharmProjects/untitled1/Class2String/St...
2018-02-25 22:55:00
89
转载 python元祖基本操作
#-*- coding:utf-8 -*-# 创建空元组# temp1 = ();# 如果元祖中只包含一个值,需用逗号隔开消除歧义# temp1=(1,)# 元祖的基本操作# 访问元祖,可以使用下标索引访问元素的值# temp1=('hello','world')# print temp1[1]# world# temp1=(1,2,3,5,7,6)# print temp1[1:5]#...
2018-02-25 12:35:00
345
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人