小白教程
所有教程
关于
Search
172.70.127.160
172.70.127.160
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Python3 string isspace”的源代码
本页内容
上一节:
Python3_string_isnumeric
下一节:
Python3_string_istitle
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:isspace()}}[[Category:python3 string|15]] = Python3 isspace()方法 = [[python3 string|Python3 字符串]] == 描述 == Python isspace() 方法检测字符串是否只由空白字符组成。 == 语法 == isspace() 方法语法: <sample title="" desc="" lang="python" hererun="1"> str.isspace() </sample> == 参数 == * 无。 == 返回值 == 如果字符串中只包含空格,则返回 True,否则返回 False. 以下实例展示了isspace()方法的实例: <sample title="" desc="" lang="python" hererun="1"> #!/usr/bin/python3 str = " " print (str.isspace()) str = "xiaoBai example....wow!!!" print (str.isspace()) </sample> 以上实例输出结果如下: <sample title="" desc="" lang="python" hererun="1"> True False </sample> [[python3 string|Python3 字符串]]
返回至“
Python3 string isspace
”。
上一节:
Python3_string_isnumeric
下一节:
Python3_string_istitle