python学习笔记之字符串

字符串格式化:format = “hello %s, %s enough for ya?”values = (‘world’,’hot’)print format % values结果:hello world, hot enough for ya?注:如果不是在命令行执行,把print后面的用括号括起来

与php类似但函数或方法名不一样的地方:php explode=> python splitphp trim => python stripphp implode => python join

python学习笔记之字符串

相关文章:

你感兴趣的文章:

标签云: