print('hello world')
print('aaa')
a=10
print (a)
a='11'
print(type(a))
a=2
a=a**10
print(a)
name='老子'
QQ='22222'
phone='11234'
addr='bj'
name=int(input())
QQ=input()
print('姓名:%d'%(name))
print('QQ:{}'.format(QQ))
score=int(input('请输入'))
if score>60:
print('YES')
pass
elif score>40 :
print('NO2')
pass
elif score>20 :
print('NO3')
pass
else :
print('NO')
import random
index=1
while index<=100:
index+=1
if index%10==0:
print(index)
pass
pass
row=9
while row>=1:
col=1
while col<=row:
print("%d*%d=%d"%(row,col,row*col),end=" ")
col+=1
pass
row-=1
print()
pass
tags='h哈哈哈'
for item in tags:
print(item)
pass
range 此函数可以生成一个数据列表
range (起始,结束,步长)
sum=1111111111111111
s=434325353242
for i in range(1,10):
if i<4:
continue
pass
print(i)
pass
print(sum*s)
test='nishizhu'
print('第一个%s'%(test[0]))
for i in range(0,7):
print('第%d个%s'%(i,test[i]))
pass
a=' dsadsasa '
b=a.strip()
a=b.capitalize()
b=a#只是把a的内存地址复制了
a='sadsad'
print(a)
print(b)
print(id(b))
print(id(a))
a='qiyuning'
# print(a.index('yuniprintng'))
print(a)
print(a[5:2:-1])
li=[1,2,3,'张萌小']
print(len(li))
s=[1,'aa','ewqewq','混蛋',True,11.99]
#print(s[1:])
s.append(['asd','滚蛋'])
s.append(9999)
print(s)
s=['hh',99]
s.insert(1,'哈哈')
b=list(range(10))
s.extend(b)
print(s)
s=['hh',99,999]
s[0]=77.9
print(s)
# del s[0]
# del s[:1]
s.pop(0)
s.remove(99)
print(s)
a=(11,2.2,'嘎嘎嘎',['22',22])
for i in a:
print(i)
dicta={}
dicta['a']=311
dicta['b']=222
print(dicta)
dicta[112]='pp'
print(dicta)
print(dicta.keys())
print(dicta.values())
for i in dicta.items():
print(i)
print(sorted(dicta.items(),key=lambda d:d[1]))
s=[111,24,'2']
print(s*3)
print(111 in s)
d={'aa':22}
print('aa' in d)
|