Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. import sys
  2. import os
  3.  
  4.  
  5. def get_file(filename):
  6. file = open(filename)
  7. print(file.readline())
  8.  
  9. dic = {}
  10.  
  11. for line in file:
  12.  
  13. columns = line.split()
  14. print(columns)
  15. d = columns[2]
  16. dic[d] = ''
  17.  
  18.  
  19. if columns[1] == '30': #lub columns[1] == '30' w zaleznosci od pliku
  20. U = columns[3]
  21. dic[d] = U
  22.  
  23. return(dic)
  24.  
  25.  
  26. filename = 'Wynik_100.txt'
  27.  
  28. listISI = get_file(filename)
  29. print(listISI)
  30. #sys.exit(0)
  31. '''
  32. file2 = open('ISI_chaotic.txt', 'w')
  33.  
  34. for el in listISI:
  35. file2.write(str(el).replace('.', ',') + ";" + '\n')
  36. '''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement