Advertisement
DomMisterSoja

Manipulando imagem(2b)

Sep 14th, 2018
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. arquivo=open('vitor.pgm','r')
  2. geral=''
  3. l1 = arquivo.readline()
  4. l2 = arquivo.readline()
  5. l3 = arquivo.readline()
  6. for i in arquivo:
  7.     geral = i + geral
  8. print(geral)
  9.  
  10. arquivo.close()
  11.  
  12. arquivo2 = open('vitor4.pgm','w')
  13. arquivo2.write(l1)
  14. arquivo2.write(l2)
  15. arquivo2.write(l3)
  16.  
  17. arquivo2.writelines(geral)
  18.  
  19. arquivo2.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement