1. 首页
  2. 数据库
  3. 其它
  4. 浅谈Python基础—判断和循环

浅谈Python基础—判断和循环

上传者: 2020-12-31 13:21:17上传 PDF文件 210.53KB 热度 21次
判断 缩进代替大括号。 冒号(:)后换号缩进。 if test=100 if test>50: print('OK') print('test') if-elif-else test=50 if test>200: print('200') elif test<100: print('100') else: print('100-200') 列表 test1=[123,456,789] if 123 in test1: print('OK') 字典 test2={'hello':123,'world':456} if 'hello' in test2: prin
下载地址
用户评论