码迷,mamicode.com
首页 >  
搜索关键字:strip    ( 2365个结果)
字符串、列表、元组、字典
字符串 join split find strip upper lower replace max() min() in ord(字符转ASCI) chr(ASCIl转字符) len() for 索引 切片 +连接两个字符串 'a'+'b'='ab 占位符%s {} range(100) 字符串不可 ...
分类:其他好文   时间:2018-08-16 00:53:11    阅读次数:115
atm
from interface import user,shopping,bankfrom lib import commondef register(): while True: print('注册') inp_name=input('请输入用户名').strip() pwd=input('请输入密 ...
分类:其他好文   时间:2018-08-16 00:42:36    阅读次数:149
JavaScript 运行机制详解
本文转自阮一峰大神 【个人理解点:】 1. "任务队列"是一个事件的队列,只要事件指定过回调函数,这些事件完成任务时,就会向"任务队列"添加一个事件,等待主线程读取。 2. 当主线程执行完“执行栈”中的同步任务之后,去开始执行已经完成任务等待中的异步任务,执行的就是任务对应的回调函数 3. 主线程的 ...
分类:编程语言   时间:2018-08-15 20:36:50    阅读次数:208
socket 基于udp实现远程执行命令
server.py client.py ...
分类:其他好文   时间:2018-08-15 20:35:29    阅读次数:133
python-字符串处理-去除首尾特定字符
S.strip([chars])leading and trailingexample:my_str = '(d)d(d)))'        ->       'd)d(d'
分类:编程语言   时间:2018-08-14 11:29:33    阅读次数:175
Python开发【第三篇】基本数据类型
整型 int 字符串 str 1 __author__ = "Tang" 2 3 """不要指望一下全背下来""" 4 """必会的:join split find strip upper lower replace""" 5 6 # capitalize() 首字母大写 7 a = 'tang' ...
分类:编程语言   时间:2018-08-13 23:46:22    阅读次数:230
修饰器-2
import timeuser,passwd = "gx","gx123"def auth(func): def wrapper(*args,**kwargs): username = input("username:").strip() password = input("password:"). ...
分类:其他好文   时间:2018-08-12 21:35:17    阅读次数:118
Python修行之路之字符串(二)修改、查找、格式化
字符串修改replace(old,new[,count])->str字符串中找到匹配替换为新子串,返回新字符串count表示替换几次,不指定就是全部替换原字符串为一个常量,不可变。修改返回的为新子串strip([chars])->str从字符串两端去除指定字符集chaars中的所有字符如果chars没有指定,去除两端的空白字符空白字符、就是指看不见的字符如\r\n\t空格空白字符,空串
分类:编程语言   时间:2018-08-12 19:59:55    阅读次数:232
函数基础
2.自定义函数: 语法:def 函数名(参数1,参数2,...): ‘‘‘注释信息‘‘‘ 函数体 return #返回值 def auth(): name=input(‘name>>:‘).strip() password=input(‘password>>:‘).strip() if name == ‘abc‘ and password == ‘123‘: print(‘login successfull‘) else: print(‘user or password err‘) auth() 3.定义函数的三种形式: (1):无参函数 (2):有参函数 (3):空函数 有参函数: def auth(name,password): if name == ‘abc‘ and password == ‘123‘: print(‘login successfull‘) else:
分类:其他好文   时间:2018-08-12 12:17:31    阅读次数:149
爬虫_古诗文网(队列,多线程,锁,正则,xpath)
运行结果 ...
分类:编程语言   时间:2018-08-11 18:16:03    阅读次数:219
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!