#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)

发表回复

后才能评论

评论(1)

  • 小伍 2018年11月1日 下午4:46

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

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

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