python入门5 (字典)
摘要:1.什么是字典 2. 字典的创建 '''使用{}创建字典方式1''' scores={'张三':100,'李四':98,'王五':44} print(scores) print(type(scores)) '''第二种创建dict()''' student=dict(name='jack',age=
阅读全文
posted @
2021-11-30 00:12
从精通到陌生
阅读(66)
推荐(0) 编辑
python入门4 (列表)
摘要:1.为什么需要列表 a=10 #变量存储的是一个对象的引用 lst=['hello','world',98] print(id(lst)) print(type(lst)) print(lst) 2.列表的创建 '''创建列表的第一种方式,使用[]''' lst =['hello','world',
阅读全文
posted @
2021-11-28 23:22
从精通到陌生
阅读(75)
推荐(0) 编辑
python入门3 (流程控制)
摘要:1.pass语句 answer=input('您是会员吗?y/n:') #判断是否是会员 if answer=='y': pass else: pass 2.range()函数用法 #range()的三种创建方式 '''第一种创建方式,只有一个参数(小括号中只给了一个数)''' r=range(10
阅读全文
posted @
2021-11-28 12:45
从精通到陌生
阅读(63)
推荐(0) 编辑
python入门2
摘要:1.对象的布尔值 #测试对象的布尔值 print(' 以下对象布尔值全为False ') print(bool(False)) #False print(bool(0)) #False print(bool(0.0)) #False print(bool(None)) #False print(bo
阅读全文
posted @
2021-11-21 22:19
从精通到陌生
阅读(40)
推荐(0) 编辑
python入门1
摘要:1.print print('helloworld') print("helloworld") print(5) print(1+3) #将数据输出到文件中,注意点:1.所指定的盘符存在,2.使用file= 接收 fp=open('D:/text.txt','a+') print('hellowor
阅读全文
posted @
2021-11-21 10:48
从精通到陌生
阅读(44)
推荐(0) 编辑
Flink代码1
摘要:1.maven依赖 <dependency> <groupId>org.apache.flink</groupId> <artifactId>flink-java</artifactId> <version>1.10.1</version> </dependency> <dependency> <g
阅读全文
posted @
2021-11-17 00:22
从精通到陌生
阅读(187)
推荐(0) 编辑