Test case 2,3 failing why? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

Test case 2,3 failing why?

Creating a file with 1 to n numbers with different lines my output was correct but test case 2 , 3 are failing please check it https://code.sololearn.com/cb991L4Tz16S/?ref=app

29th Aug 2021, 5:48 PM
Kothooru Narendar
Kothooru Narendar - avatar
2 ответов
+ 1
Narendhar Kothuri The ‘a‘ mode writes the file from the end of it and doesn’t care about what has already been written, while the ‘w’ mode erases the file to an empty state and starts writing and the beginning of the file.
29th Aug 2021, 8:50 PM
Wenkai Qu
Wenkai Qu - avatar
0
Can you please explain me what is exact difference between 'a' and 'w' mode
29th Aug 2021, 6:56 PM
Kothooru Narendar
Kothooru Narendar - avatar