Guest User

Untitled

a guest
Aug 22nd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. "https://bla.bla/....jpg"
  2. "https://bla.bla/....jpg"
  3. "https://bla.bla/....jpg"
  4.  
  5. <img src="https://bla.bla/....jpg">
  6. <img src="https://bla.bla/....jpg">
  7. <img src="https://bla.bla/....jpg">
  8.  
  9. with open('test.txt', 'r') as f:
  10. file = f.read()
  11.  
  12. file = file.split('n')
  13. for i in range(len(file)):
  14. file[i] = '<img src={}>'.format(file[i])
  15.  
  16. with open('test.txt', 'w') as f:
  17. for line in file:
  18. f.write(line + 'n')
Add Comment
Please, Sign In to add comment