#!/usr/bin/python3


#-----------title-----------------
#			name.title()	 |
#			name.upper()
#			name.lower()
#-----------------------------
#name = "may Aame is Atom"
#
#print (name.upper())
#print (name.lower())
#---------------------------------


#---------------------------------
#字符串相加
#---------------------------------
#first_name = "A"
#last_name = "tom"
#full_name = first_name + last_name
#
#print (full_name.upper())
#---------------------------------


#-------------\n \t----------------
#打印制表符 &　换行
#----------------------------------
#print ("atom \n \t atom")
#----------------------------------


#--------lstrip()--rstrip()--------
#删除多余空白
#----------------------------------
#STR = ' PYTHON  '
#print (STR)
#print (STR.lstrip())
#----------------------------------


#----------str()-------------------
#转换类型，避免类型错误
#----------------------------------
#age = 23
#message = "happy " + str(age) + "rd"
#print (message)
#----------------------------------


####################################################################
			#		list		#
			
names = ['atom','lz','tom']
#print (names[0].title())
#print (names[-2].title())
#message = "may name is " + names[2] + "."
#print (message)
#-------------------------------


#----------------------------------------------
#创建的大多数列表都是动态的，意味着可以运行时可以增删元素|
#----------------------------------------------
#names = ['atom','lz','tom']
#names[0] = "atom2"
#print(names)
#----------------------------------------------
#names = ['atom','lz','atom']
#names.append("atom2")  #在末尾添加
#print(names)
#----------------------------------------------
#names = ['atom','lz','tom']
#names.insert(1,'1')    #在任意位置插入
#print(names)
#----------------------------------------------
#names = ['atom','lz','tom']
#del names[1]			#删除一个元素
#print(names)
#----------------------------------------------
#names = ['atom','lz','tom']
#print(names.pop())   	#弹出最后一个元素
#print (names.pop(1))	#弹出任意一个元素s
#print(names)
#----------------------------------------------
#names = ['atom','lz','tom']
#names.remove('lz');
#print(names)			#根据值来删除元素
#----------------------------------------------
#names.sort()			#根据首字母来排序
#print (names)
#----------------------------------------------
#names.sort(reverse = True)	#反序排列
#print(names)
#-----------------------------------------------
#print (sorted(names,reverse = True)) #临时反序排列
#print (names)
#-----------------------------------------------
#names.append('??')
#print (len(names)) 		#用len来获得列表长度
#-----------------------------------------------
#for i in names:			#循环打印列表
#	print (i.title() + ",nice")
#-----------------------------------------------
#for i in range(1,5):		#用range生成１－４的数字列表
#	print(i)
#-----------------------------------------------
#names = list(range(1,5))	#用list将range的值转换为列表
#print(names)
#-----------------------------------------------
#names = list(range(1,11,2))	#用２累加生成列表
#print (names)
#-----------------------------------------------
#for i in range(1,11,2):
#	print(i**2)					#**表示乘方
#-----------------------------------------------
#digits = list(range(0,10+1))
#print (min(digits))			#拿出最小值
#print (max(digits))			#拿出最大值
#print (sum(digits))			#拿出和
#------------------------------------------------
#print (names[0:2])				#切片,拿出index0,index1
#print (names[:3])				#拿出index0,index1,index2
#print (names[1:])				#拿出index1,index2
#------------------------------------------------
#names2 = names[:]				#复制整个列表得用切片
#print (names2)
#------------------------------------------------
#digits = (200,50)				#定义一个元组,元组不可变,列表可变
#print (digits)
#------------------------------------------------
#digits = (200,50)
#print (digits)
#digits = (250,50,10)			#虽然不可以修改元组的值,但是可以重新定义
#print (digits)
#------------------------------------------------
