readlines() Py | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

readlines() Py

Hi there! please tell me why the file.readlines() method only outputs [] to the console. Thanks

18th Aug 2022, 9:32 PM
Artem Kodolov
Artem Kodolov - avatar
4 Respostas
+ 2
file is empty!!! ?
18th Aug 2022, 9:48 PM
Jayakrishna šŸ‡®šŸ‡³
0
Sorry, no. Thats .txt file, with some text on multiple lines of strings. And console print output ā€œ[ ]ā€ šŸ„ŗ
18th Aug 2022, 10:33 PM
Artem Kodolov
Artem Kodolov - avatar
0
file.read output text inside , but readlines NO
18th Aug 2022, 10:34 PM
Artem Kodolov
Artem Kodolov - avatar
0
šŸ¤”can you show the code?
19th Aug 2022, 8:29 AM
Jayakrishna šŸ‡®šŸ‡³