For this Question: Given a string s, Find total number of characters excluding spaces.First line of the input contains the string s.

<b>Constraints</b>
1 <= s. size() <= 10<sup>5</sup>Print number of characters excluding spaceSample Input 1:
newton School

Sample Output 1:
12, I have written this Solution Code: s=input()
count=0
for i in range(0,len(s)):
    if(s[i]!=' '):
        count=count+1
print(count), In this Programming Language: Python, Now tell me if this Code is compilable or not?