Wednesday 23 October 2019

python - How to read a file line-by-line into a list?

How do I read every line of a file in Python and store each line as an element in a list?



I want to read the file line by line and append each line to the end of the list.

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...