Why in sololearn and JupiterNotebook output different | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why in sololearn and JupiterNotebook output different

in file : Harry Potter Some books Input: file = open(".../books.txt", "r") f = file.readlines() for i in f: print (i[0], len(i) - i.count('\n'), sep = '') file.close() Output: H12 S10 but output in sololearn: H1 a1 r1 etcetera WTF? sorry for my English

30th Jul 2021, 5:55 AM
Tomi
1 Answer
+ 5
Because both compilers give different answers on same Cretiria. As their solving such problem may use different logic. I hope it clears your doubt.
30th Jul 2021, 7:03 AM
Aysha
Aysha - avatar