Closed madhumitan closed 4 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']
%%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