Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

number of spaes pythopn

# '.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'
 
PREVIOUS NEXT
Tagged: #number #spaes #pythopn
ADD COMMENT
Topic
Name
9+5 =