上一页 1 ··· 3 4 5 6 7 8 下一页
摘要: 1、将列表中的数字如何按照绝对值进行排序 现有列表alist=[3,1, 4, 2],按其元素的绝对值大小进行排序? 阅读全文
posted @ 2020-03-17 22:16 Chuan_Chen 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 今天看到一个例子,非常有意思,记录一下。 随机生成一个数字,输入一个数字看是否匹对,匹配则结速,反之提示是大了还是小了, 代码如下: 阅读全文
posted @ 2020-03-17 17:29 Chuan_Chen 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 第一章--开发基础学 总结 历时 10天 第一章开发基础学习完了,马上就要预约考试, 在此进行一个第一章的学习总结: 1、列表 [ ] 有序的,从左到右、可存放多个值。 末尾添加:append 删除 :remove 添加列表: extend 从末尾开始删:pop 长度:len 包含 :in 真则返回 阅读全文
posted @ 2018-03-26 01:03 Chuan_Chen 阅读(178) 评论(4) 推荐(0) 编辑
摘要: 1 dict = {"k1":"v1","k2":"v2","k3":"v3"} 2 3 #1、请循环遍历出所有的key 4 for k in dict: 5 print(k) 1 for k in dict: 2 print(dict[k]) 1 for k in dict: 2 print(k, 阅读全文
posted @ 2018-03-21 11:47 Chuan_Chen 阅读(812) 评论(0) 推荐(0) 编辑
摘要: # 创建一个空列表 命名为names 并添加一些数据names=[ ]# names.append('alex')names.extend(['wangcc','zss','123123','bleak_girl'])# print(names)#往names列表里的bleak_girl 的前面插入 阅读全文
posted @ 2018-03-21 00:02 Chuan_Chen 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 今天是3月19日 今天来做一下 第一章 第二节的练习题 首先是列表的相关总结 阅读全文
posted @ 2018-03-20 01:10 Chuan_Chen 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 三元运算 : 文件报错科普: 提示错误OSError: [Errno 22] Invalid argument: ‘文件路径’。 原因是在路径中含有 \ 。在python中 \ 是转义字符、就是这个原因 ,有两种方法, 1、使用 \ \ 取消转义 2、使用反斜杠代表路径、 如下图所示: 二进制模式打 阅读全文
posted @ 2018-03-18 21:43 Chuan_Chen 阅读(152) 评论(0) 推荐(0) 编辑
摘要: while习题之8 使用while循环实现输出2-3+4-5+6...+100 的和 个人感觉第二种list的方式更加简答易读。 使用 while 循环实现输出 1,2,3,4,5, 7,8,9, 11,12 简单易读,这是简化之后的,把n+=1放在了前面。简洁哦 使用while 循环输出100-5 阅读全文
posted @ 2018-03-16 13:57 Chuan_Chen 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 声明变量 name = “wang” 变量定义规则 1.变量名只能是字母,数字或者下划线的任意组合。 2.变量名的第一个字符不能是数字 3.以下关键字不能声明为变量名【‘and’,‘as’.............】 变量名命名规范 驼峰体 AgeOfoldboy = 23 下划线 age_info 阅读全文
posted @ 2018-03-15 16:12 Chuan_Chen 阅读(286) 评论(0) 推荐(0) 编辑
摘要: 最近这几天比较忙,也是自己比较拖延,下了一个app 奇妙清单,希望可以有点作用。 深拷贝与浅拷贝 >copy 浅拷贝:copy浅拷贝,没有拷贝子对象,所以原始数据改变,子对象会改变 c=copy.copy(alist) 深拷贝:深拷贝,包含对象里面的自对象的拷贝,所以原始对象的改变不会造成深拷贝里任 阅读全文
posted @ 2018-03-13 11:33 Chuan_Chen 阅读(204) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 下一页
#waifu-toggle { background-color: #fa0; border-radius: 5px; bottom: 66px; color: #fff; cursor: pointer; font-size: 12px; right: 0; margin-right: -100px; padding: 5px 2px 5px 5px; position: fixed; transition: margin-right 1s; width: 60px; writing-mode: vertical-lr; } #waifu-toggle.waifu-toggle-active { margin-right: -40px; } #waifu-toggle.waifu-toggle-active:hover { margin-right: -30px; } #waifu { bottom: -1000px; right: 0; line-height: 0; margin-bottom: -10px; position: fixed; transform: translateY(3px); transition: transform .3s ease-in-out, bottom 3s ease-in-out; z-index: 1; } #waifu:hover { transform: translateY(0); } #waifu-tips { animation: shake 50s ease-in-out 5s infinite; background-color: rgba(236, 217, 188, .5); border: 1px solid rgba(224, 186, 140, .62); border-radius: 12px; box-shadow: 0 3px 15px 2px rgba(191, 158, 118, .2); font-size: 14px; line-height: 24px; margin: -30px 20px; min-height: 70px; opacity: 0; overflow: hidden; padding: 5px 10px; position: absolute; text-overflow: ellipsis; transition: opacity 1s; width: 250px; word-break: break-all; } #waifu-tips.waifu-tips-active { opacity: 1; transition: opacity .2s; } #waifu-tips span { color: #0099cc; } #waifu #live2d { cursor: grab; height: 300px; position: relative; width: 300px; } #waifu #live2d:active { cursor: grabbing; } #waifu-tool { color: #aaa; opacity: 0; position: absolute; left: -10px; top: 70px; transition: opacity 1s; } #waifu:hover #waifu-tool { opacity: 1; } #waifu-tool span { color: #7b8c9d; cursor: pointer; display: block; line-height: 30px; text-align: center; transition: color .3s; } #waifu-tool span:hover { color: #0684bd; /* #34495e */ } @keyframes shake { 2% { transform: translate(.5px, -1.5px) rotate(-.5deg); } 4% { transform: translate(.5px, 1.5px) rotate(1.5deg); } 6% { transform: translate(1.5px, 1.5px) rotate(1.5deg); } 8% { transform: translate(2.5px, 1.5px) rotate(.5deg); } 10% { transform: translate(.5px, 2.5px) rotate(.5deg); } 12% { transform: translate(1.5px, 1.5px) rotate(.5deg); } 14% { transform: translate(.5px, .5px) rotate(.5deg); } 16% { transform: translate(-1.5px, -.5px) rotate(1.5deg); } 18% { transform: translate(.5px, .5px) rotate(1.5deg); } 20% { transform: translate(2.5px, 2.5px) rotate(1.5deg); } 22% { transform: translate(.5px, -1.5px) rotate(1.5deg); } 24% { transform: translate(-1.5px, 1.5px) rotate(-.5deg); } 26% { transform: translate(1.5px, .5px) rotate(1.5deg); } 28% { transform: translate(-.5px, -.5px) rotate(-.5deg); } 30% { transform: translate(1.5px, -.5px) rotate(-.5deg); } 32% { transform: translate(2.5px, -1.5px) rotate(1.5deg); } 34% { transform: translate(2.5px, 2.5px) rotate(-.5deg); } 36% { transform: translate(.5px, -1.5px) rotate(.5deg); } 38% { transform: translate(2.5px, -.5px) rotate(-.5deg); } 40% { transform: translate(-.5px, 2.5px) rotate(.5deg); } 42% { transform: translate(-1.5px, 2.5px) rotate(.5deg); } 44% { transform: translate(-1.5px, 1.5px) rotate(.5deg); } 46% { transform: translate(1.5px, -.5px) rotate(-.5deg); } 48% { transform: translate(2.5px, -.5px) rotate(.5deg); } 50% { transform: translate(-1.5px, 1.5px) rotate(.5deg); } 52% { transform: translate(-.5px, 1.5px) rotate(.5deg); } 54% { transform: translate(-1.5px, 1.5px) rotate(.5deg); } 56% { transform: translate(.5px, 2.5px) rotate(1.5deg); } 58% { transform: translate(2.5px, 2.5px) rotate(.5deg); } 60% { transform: translate(2.5px, -1.5px) rotate(1.5deg); } 62% { transform: translate(-1.5px, .5px) rotate(1.5deg); } 64% { transform: translate(-1.5px, 1.5px) rotate(1.5deg); } 66% { transform: translate(.5px, 2.5px) rotate(1.5deg); } 68% { transform: translate(2.5px, -1.5px) rotate(1.5deg); } 70% { transform: translate(2.5px, 2.5px) rotate(.5deg); } 72% { transform: translate(-.5px, -1.5px) rotate(1.5deg); } 74% { transform: translate(-1.5px, 2.5px) rotate(1.5deg); } 76% { transform: translate(-1.5px, 2.5px) rotate(1.5deg); } 78% { transform: translate(-1.5px, 2.5px) rotate(.5deg); } 80% { transform: translate(-1.5px, .5px) rotate(-.5deg); } 82% { transform: translate(-1.5px, .5px) rotate(-.5deg); } 84% { transform: translate(-.5px, .5px) rotate(1.5deg); } 86% { transform: translate(2.5px, 1.5px) rotate(.5deg); } 88% { transform: translate(-1.5px, .5px) rotate(1.5deg); } 90% { transform: translate(-1.5px, -.5px) rotate(-.5deg); } 92% { transform: translate(-1.5px, -1.5px) rotate(1.5deg); } 94% { transform: translate(.5px, .5px) rotate(-.5deg); } 96% { transform: translate(2.5px, -.5px) rotate(-.5deg); } 98% { transform: translate(-1.5px, -1.5px) rotate(-.5deg); } 0%, 100% { transform: translate(0, 0) rotate(0); } } © 2022 GitHub, Inc. Terms Privacy Securi