让你快速学习python基础笔记003(一起动手实践)

来源:互联网 发布:数据库触发器工作原理 编辑:程序博客网 时间:2024/05/29 19:55
python 基本数据类型讲解(3\2)一:类型1 不可变数据类型string,int ,tuple 常量字符串不可变之再探string[1] = 'new_one' can?2 可变数据类型变量dict list二 再研究字符串序列到底是什么1 三个符合的区别 '',"",""" """2 偏移量从0开始3 如何修改字符串之replace,find三 格式化细究1 % 格式化方式2 format格式化方式3 为什么要用format4 还有一个方法,字典来了。四 再议打开文件标准库的介绍 linecache
#__author__ = 'Administrator'#coding:utf-8#1, 0b = "this is {1} {0} " .format("apple","my")print b#形参b = "this is {whose} {fruit}" .format(whose = "mine",fruit = "apple");print ba = "this is %s %s" % ('my','apple')print aa = "this is %(whose)s %(fruit)s" % {'whose':'my','fruit':'apple'}print a
0 0