the question is this and the answer i found out is this:-
for i in range(int(input())):
n = input().strip();
counts = n.count('4') + n.count('7')
now, what’s i am not getting is what’s the use of split() here?
the code is working perfectly even without that !
i am a beginner!
.strip() function is used to prevent white spaces in input buffer, as it will strip and extract the expected input from actual input…
strip() removes all whitespace at the start and end, including spaces, tabs, newlines and carriage returns. Leaving it in doesn’t do any harm, and allows your program to deal with unexpected extra whitespace inserted into the file.
where is .split() in this code?