Printing - Python [closed]

2 weeks ago 11
ARTICLE AD BOX

I am making this basic movie booking system without interface which runs in the terminal.But when I want to print he list of movies to book the multi line printing is having a problem

code:

print("Welcome To MovieBooking") movies = [] def load_movies(): with open(r"Data\Movies.txt","r") as moviefile: for movies1 in moviefile: movies.append(movies1) load_movies() print(f"""Movies: 1.{movies[0]} 2.{movies[1]} 3.{movies[2]} 4.{movies[3]} 5.{movies[4]} """)

and this is the output:

Welcome To MovieBoking Movies: 1.Lokah 2.Mission Impossible:Final Reckoning 3.Jurassic World:Rebirth 4.Pet Detective 5.Polar Express

I want to know how I can fix the gaps in the output like the Mission impossible (One line Gap) polar express

Read Entire Article