Pierian-Data / Complete-Python-3-Bootcamp

Course Files for Complete Python 3 Bootcamp Course on Udemy
27.21k stars 84.9k forks source link

i need new line in this code #55

Closed madhumitan closed 4 years ago

madhumitan commented 5 years ago

%%writefile mylife.txt hello ord hello cazy hello weezy & zak hello hemy & max mylife=open('mylife.txt') mylife.read() mylife.seek(0) mylife.read() contents=mylife.seek(0) mylife.readlines() ['hello ord \n', 'hello cazy\n', 'hello weezy & zak \n', 'hello hemy & max \n']

i need above lines in new lines

bh72 commented 5 years ago

Hello, I check your code and it seems that there is something wrong with your text by using "&" sign, which cause that they don't come in new lines...

change the "&" sign to "and", see the result,

Good luck

madhumitan commented 5 years ago

thank you so much,its working

i understood my mistake