文章

存一下,第三章Python笔记

#coding:gbk
names=['miaomiao','siyuan','wuyang','chengmeizhen']
message='my first love is '+names[0]+' .'
print(names[1],names[2],names[3],names[0])

print(names[0].title()+' hi, how are u!' '\n'+names[1].title()+' hi,how are u!' '\n'+names[2].title()+' hi,how are u!' '\n'+names[3].title()+' hi,how are u!' )

jiaotong=['car','moto','bick']
lovecar='is my best love'
lovemoto='is my second love'
lovebick='is my secord love'
print(jiaotong[0].title()+lovecar+'\n'+jiaotong[1].title()+lovemoto+'\n'+jiaotong[2].title()+lovebick)

moto=['honda','toyota','suzuki']
print(moto)
moto[0]='ducati'
print(moto)
moto.append('yamazaki')
print(moto)
moto.insert(1,'ford')
print(moto)
del moto[0]
print(moto)
print('\n')

moto=['yamazaki','honda','toyota','ford']
#print(moto[-1]) 其实也可以这样输出 print(moto.pop())
print(moto[-1])
print(moto.pop())
pop_moto=moto.pop()
print(moto)
print(pop_moto)

原文来自:存一下,第三章Python笔记,尊重自己,尊重每一个人;转发请注明来源!
0 0

发表评论

  • 评论1则,共1页,当前第1
    • 游于艺 [管理员]

      python3.7 打包成exe
      只需要一个命令就完事了

      不过得先 win+R 输入cmd ----> pip3 install pyinstaller
      装好后

      cd 到你的放.py文件的目录下
      pyinstaller - F XXXX.py 就完事了