Commit e36c68c6 by BellCodeEditor

auto save

parent 0cc37ad4
Showing with 75 additions and 0 deletions
# a=['1','4',5,'1','a']
# b=''.join(a)
# print(b)
# a='123qwe'
# b=a.replace('3','')
# print(b)
# a=(1,2,3,4)
# b=1,
# c=8
# print(type(a))
# print(type(b))
# print(type(c))
# for i in range(1,10,2):
# print(i)
# car=['bmw','poersche','volvo','Audi']
# def myfunc(i):
# return len(i)
# car.sort(key=myfunc)
# print(car)
# Car=[ #创建列表car, 列表中每个元素就是一个字典
# {‘car’:’poreche’,’year’:’1963’},
# {‘car’:’Audi’,’year’:’2010’},
# {‘car’:’Bmw’,’year’:’2019’},
# {‘car’:’volve’,’year’:’2013’}
# ]
# a='32^%aV'
# sz=0
# zm=0
# qt=0
# for i in a:
# if i>='0' and i<='9':
# sz+=1
# elif i>='a' and i<='z' or i>='A' and i<='Z':
# zm+=1
# else:
# qt+=1
# print(sz,zm,qt)
# 数据 单个数据 多个数据
# 变量 列表,元组,集合,字典....
# 编程 编写程序
# 变量 变化的量
#变量
# a='1,2,3,5'
# print(a[-1])
# '12345' 2
# '1234567' 3
# while True:
# a=input("输入一个字符串")
# if len(a)%2==0:
# print(a[-1])
# else:
# print(a[len(a)//2])
# a=input("输入一个话")
# s=0
# for i in a:
# if i=='。' or i=="!" or i=="?":
# s+=1
# print(s)
# while True:
# for i in range(10):
# print(7)
变量就是一个数据的载体
for i in range(10):
标志 变量 ...里面 函数
变量 .函数.里面 [0,1,2....9]
i [0,1,2....9] 里面
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment