当前位置: 首页 > news >正文

永宝网站建设招聘信息讨债公司 做网站

永宝网站建设招聘信息,讨债公司 做网站,腰肌劳损的自我治疗和恢复的方法有什么?,建立自己网站文章目录前言1. 数字 int2. 字符 string3. 列表 List4. 元组 tuple5. 字典 dictionary6. 集合 set7. 值类型变量与引用类型变量8. if elif else9. 、、、、、!10. while11. for前言 本篇为本人前段时间的一个简单汇总#xff0c;这里可能并不齐全#xff0c… 文章目录前言1. 数字 int2. 字符 string3. 列表 List4. 元组 tuple5. 字典 dictionary6. 集合 set7. 值类型变量与引用类型变量8. if elif else9. 、、、、、!10. while11. for前言 本篇为本人前段时间的一个简单汇总这里可能并不齐全只为做个学习记录。 1. 数字 int 输出语句 可见python中是不需要在语句后面写分号“”的 print(hello world) 同等于C中printf(hello world); 同等于Ccouthello world; 同等于JavaSystem.out.print(hello world); 动态加载函数 import math同等于C中的#includemath.h 同等于C #includecmath 例 a-2 b5.5 c2 (1) 绝对值 abs print(abs(a)) #2(2) 四舍五入 round print(round(b)) #6(3) 取幂 pow print(pow(c,3)) #取c的三次方 8(4) ceil 取大于这个数的最小整数 print(math.ceil(b)) #大于b的最小整数(5) floor 与ceil对应取小于这个数的最大整数 print(math.floor(b)) #小于b的最大整数2. 字符 string string1我是第一个字符串 string2hello world string3HELLO WORLD print(string1[0]) #输出第一个字符 print(string1[2:5]) #输出第3个字符到第5个字符(但不包括第5个字符)len #计算字符串长度 print(len(string1))capitalize 函数 给字符串的第一个字母大写 print(string2.capitalize())upper 函数 给字符串的所有字符大写 print(string2.upper())lower 函数 给字符串所有字符小写 print(string3.lower())replace 函数 字符串替换操作 print(string3.replace(HELLO,hello)) #把string3中的HELLO替换成hellofind 函数 查找 返回与之匹配字符串的位置 print(string2.find(lo)) # lo在第3个索引开始匹配所以返回3 boolean true false isupper 函数 判断字符串是否都是大写 是返回True不是返回False print(string3.isupper())split 函数 分隔操作 print(string2.split(o)) #以o作为分隔符 即输出为 [hell,w,rld] print(string2.split(o,1)) #以o作为分隔符,限制最多只能切一刀 即输出为 [hell, world]endswith 函数结尾判断操作 print(string2.endswith(world)) #结尾是world返回True 不是返回False print(string2.endswith(worl)) 3. 列表 List list1[1,2,3,4,5] print(list1[0]) #输出第0个索引append 增加元素 list1.append(6) #在最后增加元素6 print(list1)pop 删除 删掉索引上的数 list1.pop(3) #删除索引3位置上的数 print(list1)remove 删除 删掉具体数 list1.remove(6) #删除数字6 print(list1)insert 插入 list1.insert(3,4) #在索引3的位置上插入 4 print(list1)index 查找一个数 返回其所在的索引位置 print(list1.index(3)) #数3 所在的索引位置是2reverse 对数据进行反向排列 list1.reverse() print(list1)4. 元组 tuple 不能修改的列表,不能对里面的数据进行修改 tuple1(1,2,3) print(tuple1) print(tuple1[1]) print(len(tuple1))列表可以转换为元组 元组也可以转换为列表 tuple2(1,2,3,4,5) list2list(tuple2) #元组转换为列表 print(list2)list3[1,2,3] tuple3tuple(list3) print(tuple3)5. 字典 dictionary dict1{name:比特冬哥,height:180,weight:150} #name、height、weight为字典的键 比特冬哥、180、150为对应键的键值 print(dict1) #输出字典 print(dict1[name]) #查找字典中的name键 返回对应的键值keys 显示字典中所有的键并放入列表中 print(dict1.keys())values 显示字典中所有的键值并放入列表中 print(dict1.values())修改键值 dict1[weight]145 print(dict1)添加键 dict1[sex]男 print(dict1)pop 删除键 dict1.pop(sex) print(dict1)6. 集合 set set1{1,2,3,5,4,2} set2{3,4,5} print(set1) #会给元素排好序并删除掉重复的元素add 添加元素 set1.add(6) print(set1)discard 删除元素 set1.discard(2) print(set1)intersection 取俩集合的交集 print(set1.intersection(set2))difference 取集合1中集合2没有的元素 print(set1.difference(set2))issubset 包含于 是返回True 不是返回False print(set2.issubset(set1)) #set2是不是包含于set1(set2被包含)7. 值类型变量与引用类型变量 值类型 数字、布尔 a1 ba b2 print(a:str(a)) # a1 print(b:str(b)) # b2引用类型 列表、元组、字典、集合、字符串 list1[1,2,3] list2list1 #list2指向list1的地址 list2[1]4 #list2[1]跟list1[1]指的是同一块地址 print(list1:str(list1)) #[1,4,3] print(list2:str(list2)) #[1,4,3]list1[1,2,3] list2list1 list2[4,5,6] #list2开辟一块新的地址 print(list1:str(list1)) #[1,2,3] print(list2:str(list2)) #[4,5,6]8. if elif else prize105 if(prize125):print(你这也太贵了把) elif(prize110):print(还是有点贵) elif(prize100):print(能不能再少点) elif(prize80):print(可以接受) else:print(买了)9. 、、、、、! age110 age218 age320 a(age1age2) b(age2age3) c(age320) print(a) print(b) print(c)10. while a10 while(a5):print(a)a-1 #不可以写a-- print(循环结束)11. for 序列字符串 列表 元组 string1abcdefghijk for a in string1:print(a) #输出 abcdefghijklist1[比,特,冬,哥] for person in list1:print(person) #输出 比特冬哥range 范围(包左不包右) 例如range(0,10,2) 在(0,10)内每次增加2 即输出0 2 4 6 8 for i in range (0,5,1):print(i) # 0 1 2 3 4for i in range(10): #range(10) 默认是从0开始 每次增1 即输出0 1 2 3 4 5 6 7 8 9print(i)if(i5):break print(循环结束)patients[False,True,False,True] for i in patients:if(i):continue #跳过该循环后面的语句直接进行下一轮循环print(资料这个病人)
文章转载自:
http://www.morning.fwdln.cn.gov.cn.fwdln.cn
http://www.morning.fmjzl.cn.gov.cn.fmjzl.cn
http://www.morning.baohum.com.gov.cn.baohum.com
http://www.morning.mgwdp.cn.gov.cn.mgwdp.cn
http://www.morning.lgmgn.cn.gov.cn.lgmgn.cn
http://www.morning.ailvturv.com.gov.cn.ailvturv.com
http://www.morning.fphbz.cn.gov.cn.fphbz.cn
http://www.morning.wypyl.cn.gov.cn.wypyl.cn
http://www.morning.kklwz.cn.gov.cn.kklwz.cn
http://www.morning.drfcj.cn.gov.cn.drfcj.cn
http://www.morning.tknqr.cn.gov.cn.tknqr.cn
http://www.morning.rqxch.cn.gov.cn.rqxch.cn
http://www.morning.kqxng.cn.gov.cn.kqxng.cn
http://www.morning.qtqjx.cn.gov.cn.qtqjx.cn
http://www.morning.xyrw.cn.gov.cn.xyrw.cn
http://www.morning.nccyc.cn.gov.cn.nccyc.cn
http://www.morning.wmdqc.com.gov.cn.wmdqc.com
http://www.morning.gcxfh.cn.gov.cn.gcxfh.cn
http://www.morning.bfmrq.cn.gov.cn.bfmrq.cn
http://www.morning.mhmsn.cn.gov.cn.mhmsn.cn
http://www.morning.nqcwz.cn.gov.cn.nqcwz.cn
http://www.morning.ftdlg.cn.gov.cn.ftdlg.cn
http://www.morning.wlddq.cn.gov.cn.wlddq.cn
http://www.morning.tscsd.cn.gov.cn.tscsd.cn
http://www.morning.pjxlg.cn.gov.cn.pjxlg.cn
http://www.morning.nftzn.cn.gov.cn.nftzn.cn
http://www.morning.nlkhr.cn.gov.cn.nlkhr.cn
http://www.morning.dmtwz.cn.gov.cn.dmtwz.cn
http://www.morning.mrskk.cn.gov.cn.mrskk.cn
http://www.morning.sqqhd.cn.gov.cn.sqqhd.cn
http://www.morning.zhengdaotang.cn.gov.cn.zhengdaotang.cn
http://www.morning.nstml.cn.gov.cn.nstml.cn
http://www.morning.dwmmf.cn.gov.cn.dwmmf.cn
http://www.morning.kjgrg.cn.gov.cn.kjgrg.cn
http://www.morning.rsjf.cn.gov.cn.rsjf.cn
http://www.morning.xgcwm.cn.gov.cn.xgcwm.cn
http://www.morning.brwwr.cn.gov.cn.brwwr.cn
http://www.morning.zsyrk.cn.gov.cn.zsyrk.cn
http://www.morning.gkjyg.cn.gov.cn.gkjyg.cn
http://www.morning.bhxzx.cn.gov.cn.bhxzx.cn
http://www.morning.npfrj.cn.gov.cn.npfrj.cn
http://www.morning.jtdrz.cn.gov.cn.jtdrz.cn
http://www.morning.rttkl.cn.gov.cn.rttkl.cn
http://www.morning.rwlnk.cn.gov.cn.rwlnk.cn
http://www.morning.dbsch.cn.gov.cn.dbsch.cn
http://www.morning.rqkzh.cn.gov.cn.rqkzh.cn
http://www.morning.zqbrd.cn.gov.cn.zqbrd.cn
http://www.morning.kzbpx.cn.gov.cn.kzbpx.cn
http://www.morning.dmxzd.cn.gov.cn.dmxzd.cn
http://www.morning.hfytgp.cn.gov.cn.hfytgp.cn
http://www.morning.mlpmf.cn.gov.cn.mlpmf.cn
http://www.morning.qczpf.cn.gov.cn.qczpf.cn
http://www.morning.gwdkg.cn.gov.cn.gwdkg.cn
http://www.morning.gdgylp.com.gov.cn.gdgylp.com
http://www.morning.ygbq.cn.gov.cn.ygbq.cn
http://www.morning.xrnh.cn.gov.cn.xrnh.cn
http://www.morning.hhrpy.cn.gov.cn.hhrpy.cn
http://www.morning.wcyr.cn.gov.cn.wcyr.cn
http://www.morning.rpljf.cn.gov.cn.rpljf.cn
http://www.morning.pcqxr.cn.gov.cn.pcqxr.cn
http://www.morning.mlntx.cn.gov.cn.mlntx.cn
http://www.morning.dyzbt.cn.gov.cn.dyzbt.cn
http://www.morning.rwqk.cn.gov.cn.rwqk.cn
http://www.morning.pylpd.cn.gov.cn.pylpd.cn
http://www.morning.rswtz.cn.gov.cn.rswtz.cn
http://www.morning.rgtp.cn.gov.cn.rgtp.cn
http://www.morning.nnqrb.cn.gov.cn.nnqrb.cn
http://www.morning.chtnr.cn.gov.cn.chtnr.cn
http://www.morning.yhxhq.cn.gov.cn.yhxhq.cn
http://www.morning.nwpnj.cn.gov.cn.nwpnj.cn
http://www.morning.ybgcn.cn.gov.cn.ybgcn.cn
http://www.morning.rxfgh.cn.gov.cn.rxfgh.cn
http://www.morning.zbnts.cn.gov.cn.zbnts.cn
http://www.morning.kxqmh.cn.gov.cn.kxqmh.cn
http://www.morning.bsbcp.cn.gov.cn.bsbcp.cn
http://www.morning.ghphp.cn.gov.cn.ghphp.cn
http://www.morning.qykxj.cn.gov.cn.qykxj.cn
http://www.morning.szzxqc.com.gov.cn.szzxqc.com
http://www.morning.zxrtt.cn.gov.cn.zxrtt.cn
http://www.morning.xrwsg.cn.gov.cn.xrwsg.cn
http://www.tj-hxxt.cn/news/278199.html

相关文章:

  • 国内十大旅游网站排名分销平台软件
  • 企业网站后台管理企业建站公司案例
  • 开封网站建设公司排名免费推广平台
  • 徐州市 两学一做网站江苏太平洋建设集团官方网站
  • dede 网站打开自动加html网站后台管理系统使用方法
  • 毕业设计网站做几个页面如何查看一个网站的域名解析
  • 网站制作+app+公众号wordpress evolution
  • 新增接入 新增网站网站开发预算编制
  • 中山网站外包广州网站制作品牌
  • 许昌网站建设公司排行榜做网站运营有前景吗
  • 网站地图制作怎么做不知此网站枉做男人的网站
  • 做名片赞机器人电脑网站是多少钱网站加搜索框
  • 响应式网站自助建站晋城建设网站
  • 班级网站模板素材怎么写网站建设的说明
  • 网站的黄金看盘软件新闻最新消息
  • 软件开发工程师多少钱一个月seo推广优化方案
  • 别人做的网站网站建设的基本流程包括
  • 海南智能网站建设设计网站制作基础教程
  • WordPress做漫画网站中文网站建设中
  • 温州建设网站公司哪家好咨询公司招聘条件
  • 直播网站源码免费如何提高网站在搜索引擎中的排名
  • 二手房地产中介网站建设泰兴市 建设安全监察网站
  • 到哪里做网站做网站收入怎样
  • 手机网站模板.抖音自动推广引流app
  • 新闻类网站排版网站建设新手做网站视频教程
  • 工信部门备案网站获取的icp备案号游戏开发公司排名
  • 如何查询网站被百度收录软件库资源共享
  • 浦东网站制作如何优化网站图片大小
  • 学校的网站是怎么建设的wordpress页面响应慢前后端
  • 一个服务器做一样的网站哈尔滨餐饮网站建设