随笔分类 - Python
摘要:大家应该知道python中print之后是默认换行的, 那如何我们不想换行,且不想讲输出内容用一个print函数输出时,就需要改变print默认换行的属性, 方法如下: print('contents', end='!@#$%^&*') end就表示print将如何结束,默认为end="\n"(换行
阅读全文
摘要:今天学习语法的时候发现字符串自带函数find和操作符in功能十分近似,几乎一模一样 if 'a' in name: print 'Yes, it contains the string "a"'if name.find('war') != -1: print 'Yes, it contains th
阅读全文
摘要:原创by南山南北秋悲 欢迎引用!请注明原地址:http://www.cnblogs.com/hwd9654/p/5676746.html 谢谢! TypeError: unsupported operand type(s) for %: 'NoneType' and 'tuple' 打印变量时遇到的
阅读全文

浙公网安备 33010602011771号