SHARE
TWEET

codigo do prof

DomMisterSoja Sep 13th, 2018 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. arquivo=open('vitor.pgm','r')
  2. geral=[]
  3. geral1=[]
  4. j=0
  5.  
  6. L1 = arquivo.readline()
  7. L2 = arquivo.readline()
  8. L3 = arquivo.readline()
  9.  
  10. linhas = []
  11. for i in arquivo:
  12.     #i = i.split(' ')
  13.     #i.reverse()
  14.     #linhas =  linhas + [ ' '.join(i) ]
  15.     linhas = [i] + linhas
  16. arquivo.close()
  17.  
  18.  
  19. arquivo2 = open('vitor2.pgm','w')
  20. arquivo2.write(L1)
  21. arquivo2.write(L2)
  22. arquivo2.write(L3)
  23.  
  24. arquivo2.writelines(linhas)
  25.  
  26. arquivo2.close()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top