2018年2月25日
摘要: # 字符串是python最常用的数据类型# 因字符串是不可变的,所以除分片赋值外的所有标准序列操作对字符串适用# temp1='just soso'# print temp1[-1:]# o# temp1=[-2]=y# print temp1# File "C:/Users/Administrat 阅读全文
posted @ 2018-02-25 22:55 谁与望天堂φ 阅读(407) 评论(0) 推荐(0) 编辑
摘要: #-*- coding:utf-8 -*-# 创建空元组# temp1 = ();# 如果元祖中只包含一个值,需用逗号隔开消除歧义# temp1=(1,)# 元祖的基本操作# 访问元祖,可以使用下标索引访问元素的值# temp1=('hello','world')# print temp1[1]# 阅读全文
posted @ 2018-02-25 12:35 谁与望天堂φ 阅读(5435) 评论(0) 推荐(0) 编辑