社区
脚本语言
帖子详情
求助:新手python问题
jverita
2010-06-26 05:25:09
def stripnulls(data):
"strip whitespace and nulls"
return data.replace("\00", " ").strip()
在这个函数中的"\00"是什么意思?(函数截取自《diveinpython》一书的例子)
...全文
56
1
打赏
收藏
求助:新手python问题
def stripnulls(data): "strip whitespace and nulls" return data.replace("\00", " ").strip() 在这个函数中的"\00"是什么意思?(函数截取自《diveinpython》一书的例子)
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
1 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
luotuo512
2010-06-26
打赏
举报
回复
\是转义字符,\00表示编码值为00的字符,可查各种编码表,在ascii中00表示nul空字符
00000000 0 00 NUL(null) 空字符
这句话的意思是把nul字符替换为空格。
Python
实现的一个自动售饮料程序代码分享
写这个程序的时候,我已学习
Python
将近有一百个小时,在CSDN上看到有人
求助
使用
Python
如何写一个自动售饮料的程序,我一想,试试写一个实用的售货程序。当然,只是实现基本功能,欢迎高手指点,
新手
学习参考。 运行环境:
Python
2.7 # encoding=UTF-8 loop=True money=0 while loop: x = raw_input('提示:请投入金币,结束投币请按"q"键') if x=='q': if money==0: print '错误:您未投入过纸币,请至少投入一张纸币后才能选购商品'
python
输出txt换行_关于
python
写入文件自动换行的
问题
新手
求助
:
Python
txt文件换行
问题
...
Python
3.5 想将从1到10写入一个文件并且自动换行 现在需要一个写文件方法,将selenium的脚本运行结果写入test_result.log文件中 首先创建写入方法 [html] view plain copy def write_result(str): writeresult=file(r'D:\eclipse4.4.1 script\my_selenium\model\test_...
实用数据分析:利用
python
进行数据分析
4)不知如何入门机器学习和人工智能 如果你也面临以上
问题
,那么你需要
python
! [你的收获]
Python
作为数据科学领域最流行的编程语言,以其强大的数据处理功能和简单的编程要求,征服了无数数据科学从业者,...
python
编写程序凯撒密码_
新手
求助
:在
Python
里面编一个类似凯撒密码的程序,急啊!!!...
该楼层疑似违规已被系统折叠隐藏此楼查看此楼原题是这样的:A Caesar cipher is a simple substitution cipher based on the idea of shifting each letter of the plaintextmessage a fixed number (called the key) of positions in the alpha...
python
凯撒密码编写程序详解_
新手
求助
:在
Python
里面编一个类似凯撒密码的程序,急啊!!!...
该楼层疑似违规已被系统折叠隐藏此楼查看此楼原题是这样的:A Caesar cipher is a simple substitution cipher based on the idea of shifting each letter of the plaintextmessage a fixed number (called the key) of positions in the alpha...
脚本语言
37,719
社区成员
34,238
社区内容
发帖
与我相关
我的任务
脚本语言
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
复制链接
扫一扫
分享
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
试试用AI创作助手写篇文章吧
+ 用AI写文章