上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 65 下一页
摘要: https://mirrors.cnnic.cn/apache/tomcat/tomcat-8/v8.5.88/bin/ 在bin里下载 64位的。zip文件 https://mirrors.cnnic.cn/apache/tomcat/tomcat-8/v8.5.88/src/ 在src里下载源码 阅读全文
posted @ 2023-05-23 21:20 胖豆芽 阅读(2322) 评论(1) 推荐(0) 编辑
摘要: ''' 字符串 split后成为列表 对列表list做倒叙的[::-1] 如果列表仅包含一个"内容",需要指定下标[0][::-1] ''' #定义方法获取 列表 指定下标的 list_name=["a","b","c"] list_name2=["abc"] list_name3="abcd,ef 阅读全文
posted @ 2023-04-11 22:32 胖豆芽 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 数据容器 1. list 列表[] ''' 字符串 split后成为列表 对列表list做倒叙的[::-1] ''' #定义方法获取 列表 指定下标的 list_name=[0,1,2,3,4,5] list_name2=[-4,-3,-2,-1] list_name3="abcd,efg" def 阅读全文
posted @ 2023-04-10 21:39 胖豆芽 阅读(20) 评论(0) 推荐(0) 编辑
摘要: ''' 元组学生 ("fqs",11,["football","music"]) 1.查询年龄所在的下标 2.查询学生姓名 3.删除学生爱好中的football 4.增加爱好 coding ''' #定义方法 def get_student(): tuple_student=("fqs",11,[" 阅读全文
posted @ 2023-04-07 23:02 胖豆芽 阅读(58) 评论(0) 推荐(0) 编辑
摘要: ''' 元组 ''' #定义方法 def get_num(): # 1.定义一个元祖 tuple_one=("fqs",18,"f",18,18,18,18) print(f"tuple_one元祖:{tuple_one}") # 2.单个元祖内元素要注意 ("fqs") 类型是str 字符串;(" 阅读全文
posted @ 2023-04-07 22:51 胖豆芽 阅读(43) 评论(0) 推荐(0) 编辑
摘要: ''' 求列表中的偶数,并放到新的列表中 ''' #定义方法 def get_ou(): list_num=[1,2,3,4,5] list_ou=[] index=0 while index<len(list_num): if list_num[index] % 2 == 0: print(f"偶 阅读全文
posted @ 2023-04-07 22:06 胖豆芽 阅读(189) 评论(0) 推荐(0) 编辑
摘要: ''' while循环打印整个数组 ''' name_list=["fqs","doudou","oldwang"] #下标从0开始 index=0 #求数组的长度 len_list=len(name_list) while index<len_list: print(f"第{index+1}个元素 阅读全文
posted @ 2023-04-07 21:14 胖豆芽 阅读(61) 评论(0) 推荐(0) 编辑
摘要: 增1.列表.append(元素) 向列表追加元素2.列表.extend(元素) 将数据容器的内容一次取出,追加到元素的尾部3.列表.insert(下标,元素) 在指定下标处,插入指定的元素删4.del列表[下标] 删除列表指定下标元素5.列表.pop(下标) 删除列表指定下标元素6.列表.remov 阅读全文
posted @ 2023-04-06 22:43 胖豆芽 阅读(13) 评论(0) 推荐(0) 编辑
摘要: ''' ATM 当前的剩余金额是个不断变化的过程 需要在存款 取款函数中声明为全局变量自己写的 ''' money_now=5000 name="fqs" def look_money_now(): print(f"{name}您的余额是{money_now}") def money_up(): m 阅读全文
posted @ 2023-04-05 15:23 胖豆芽 阅读(31) 评论(0) 推荐(0) 编辑
摘要: ''' 函数嵌套 更改全局变量使用 声称全局变量 global ''' number = 100 def b (): print(f"方法b中number:{number}") def a (): #注意 只有调用函数数 global 才能生效 global number number = 200 阅读全文
posted @ 2023-04-05 14:38 胖豆芽 阅读(48) 评论(0) 推荐(0) 编辑
上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 65 下一页