📌  相关文章
📜  spaes pythopn 的数量 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:22.680000             🧑  作者: Mango

代码示例1
# '.isspace() ' return True of False for if a character is a space

word = "How many spaces"
num = 0
for i in word:
  if(i.isspace() == True):
    num += 1
print(num) #Output: '2'