Python 3.5.1 reading from a file -


i have written maths quiz school , final task requires me take scores file , order them in various ways. performing thought simple task of writing file turned out not work. can please tell me what's missing this.

with open("class a.txt", "r") f:     list(f) 

how this:

>>> open("class a.txt", "r") f: ...     content = f.read() ...     content_list = content.split('\n')  # split on space/comma/... 

read content , split using whichever delimiter have used, whether enter (\n), comma or else.


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

post - imageshack API cURL -