码迷,mamicode.com
首页 >  
搜索关键字:strip    ( 2365个结果
Python语法练习--字符串格式化
#!/usr/bin/envpython #-*-coding:utf8-*- w_sex="女" m_sex="男" w_age=23 m_age=25 sex_input=input("请输入您的性别:").strip() age_input=int(input("请输入您的年龄:")) ifsex_input==w_sexandage_input>=w_age: print("您的信息如下:\n性别:%s\n年龄:%s\n您属于晚..
分类:编程语言   时间:2016-07-25 16:30:55    阅读次数:182
绘制图形与3D增强技巧(三)----三角形图元TRANGLE
1. glBegin(GL_TRANGLES); ........ glend(); 2.多边形的环绕方向:逆时针和顺时针的正反面 GLFront(GL_CCW)和GLFront(GL_CW); 3.三角形带 glBegin(GL_TRANGLE_STRIP); ....... glend(); 4 ...
分类:其他好文   时间:2016-07-23 21:02:26    阅读次数:181
绘制图形与3D增强技巧(二)----直线图元
一. glBegin(GL_LINES); glend(); 二.线带和线环 glBegin(GL_LINE_STRIP); glend(); glBegin(GL_LINE_LOOP); glend(); 三.设置直线宽度 glLineWidth(GLfloat width); 四.获得直线宽度范 ...
分类:其他好文   时间:2016-07-23 20:56:00    阅读次数:133
javascript IP验证
//IP验证function isIP(strIP){try{if(strIP.length<7){return false;}var re=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/g //匹配IP地址的正则表达式if(re.test(strIP)){if(RegExp.$1 < ...
分类:编程语言   时间:2016-07-20 13:34:55    阅读次数:243
python语法的一些问题1
open 文件操作 python strip()函数 .read() 、readline()与readlines() split()函数 一、open 文件操作 open/文件操作 f=open('/tmp/hello','w') #open(路径+文件名,读写模式) #读写模式:r只读,r+读写,... ...
分类:编程语言   时间:2016-07-16 20:18:35    阅读次数:359
Python下用List对员工信息表进行模糊匹配
#需求用户可以模糊查询员工信息显示匹配了多少条,匹配字符需要高亮度显示#脚本内容#!/usr/bin/envpython #_*_coding:utf-8_*_ whileTrue: info=‘info.txt‘ f=file(info) search=raw_input(‘PleaseEngterYouSearchInfo:‘) forlineinf.readlines(): i=line.strip().split() q=i[..
分类:编程语言   时间:2016-07-11 01:17:21    阅读次数:196
Day_04_User_management_system
LOGIN_FLAG=CURRENT_USER=outer(func): inner(): LOGIN_FLAG () LOGIN_FLAG: : login_part() func() inner login_part(): LOGIN_FLAG CURRENT_USER arg_name=() arg_password=() (,)f: line_rawf: line=line_raw.strip().split() arg_name==line[]: arg_password==line[]: (%(..
分类:其他好文   时间:2016-07-09 07:08:47    阅读次数:142
python 查找文本中数据并输出该行
withopen(‘cisco1.txt‘)ascisco:foreach_lineincisco:ifnoteach_line.find(‘err-disabled‘)==-1:i=each_line.strip()print(i)
分类:编程语言   时间:2016-07-08 11:58:33    阅读次数:239
Python str.strip()函数
下面的英文说明是官方给出:string.strip(s[,chars])Returnacopyofthestringwithleadingandtrailingcharactersremoved.IfcharsisomittedorNone,whitespacecharactersareremoved.IfgivenandnotNone,charsmustbeastring;thecharactersinthestringwillbestrippedfromthebothendsof..
分类:编程语言   时间:2016-07-07 22:42:43    阅读次数:2622
shell命令---dirname
用途说明 dirname命令可以取给定路径的目录部分(strip non-directory suffix from file name)。这个命令很少直接在shell命令行中使用,我一般把它用在shell脚本中,用于取得脚本文件所在目录,然后将当前目录切换过去。根据手册页上说的“Print NAM ...
分类:系统相关   时间:2016-07-04 22:17:45    阅读次数:247
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!