Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: My Loop for printing text file goes to infinity
Post: RE: My Loop for printing text file goes to infinit...

The problem of infinity was there because i did not write f=f.readline() in the loop again. After that it worked perfectly. Thanks by the way!
Nomex Homework 7 4,271 Feb-10-2020, 01:42 PM
    Thread: My Loop for printing text file goes to infinity
Post: RE: My Loop for printing text file goes to infinit...

The assignment is to make a menu and the first option of that menu is to print the list of cities. So how would i use the loop to print the text file using .readline(). How would it print forever? If ...
Nomex Homework 7 4,271 Feb-08-2020, 04:43 AM
    Thread: My Loop for printing text file goes to infinity
Post: My Loop for printing text file goes to infinity

I have to print a text file (cities) in a While Loop but it goes to infinity filehandle=open("cities.txt", "r") f = filehandle.readline() while f != "": print(f) filehandle.close()
Nomex Homework 7 4,271 Feb-08-2020, 03:44 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020