+ 1

Challenge string manipulations

print the number of spaces in input without using count function or loops

16th Mar 2018, 5:54 AM
kaliki chandu
kaliki chandu - avatar
2 Answers
+ 3
print(len(input().split(' '))-1)
16th Mar 2018, 6:07 AM
Louis
Louis - avatar
16th Mar 2018, 6:13 AM
sayan chandra
sayan chandra - avatar