2019年5月10日

摘要: 函数:startswith() 作用:判断字符串是否以指定字符或子字符串开头 一、函数说明语法:string.startswith(str, beg=0,end=len(string)) 或string[beg:end].startswith(str) 参数说明:string: 被检测的字符串str 阅读全文

posted @ 2019-05-10 12:54 可妮兔❀ 阅读(2103) 评论(0) 推荐(0) 编辑

摘要: 函数:string.join()Python中有join()和os.path.join()两个函数,具体作用如下: join(): 连接字符串数组。将字符串、元组、列表中的元素以指定的字符(分隔符)连接生成一个新的字符串 os.path.join(): 将多个路径组合后返回一、函数说明1、join( 阅读全文

posted @ 2019-05-10 01:28 可妮兔❀ 阅读(348) 评论(0) 推荐(0) 编辑

摘要: for循环可以遍历某一对象(遍历:通俗点说,就是把这个循环中的第一个元素到最后一个元素依次访问一次)。for循环的结构如下 具体例子打印乘法表: 阅读全文

posted @ 2019-05-10 01:16 可妮兔❀ 阅读(575) 评论(0) 推荐(0) 编辑


Copyright © 2024 可妮兔❀
Powered by .NET 8.0 on Kubernetes