【Python基础语法学习】
2021/5/5 1:25:20
本文主要是介绍【Python基础语法学习】,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
1 import math 2 ''' 3 n="987654321" 4 5 print(l[1:7]*2) #repeat 6 m=(1,6,2.9,'a') 7 print(m[2]) 8 9 d={} #先声明(? 10 d[98]=356 11 d['a']="nihao" 12 print(d.values()) 13 14 print(9/2) #4.5 15 print(3^2) #1 16 if 1 and 0: 17 print(123) 18 19 if 'a' in l: 20 print(123) 21 a=1 22 while a<9: 23 print(a) 24 a+=1 25 else: 26 print(0) 27 a+=1 28 l=['x','y','z','a','b','c','d','o',] 29 30 for le in l: 31 if le=='a': 32 continue 33 #print(le) 34 else: 35 pass 36 print(0) 37 38 def sum(a,b): 39 #pass 40 print(a+b) 41 #return 42 print(sum(9,8),"hhh") 43 ''' 44 fp=open("123.txt","a") 45 fp.write("ooooo") 46 fp.close
这篇关于【Python基础语法学习】的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-12-28Python编程基础教程
- 2024-12-27Python编程入门指南
- 2024-12-27Python编程基础
- 2024-12-27Python编程基础教程
- 2024-12-27Python编程基础指南
- 2024-12-24Python编程入门指南
- 2024-12-24Python编程基础入门
- 2024-12-24Python编程基础:变量与数据类型
- 2024-12-23使用python部署一个usdt合约,部署自己的usdt稳定币
- 2024-12-20Python编程入门指南