Commit 0b8fe26e by Patryk Czarnik

zmiany we wczytywaniu c.d.

parent 409607e4
......@@ -18,12 +18,9 @@ class Employee:
def read_csv(file_path='emps.csv'):
emps = []
with open(file_path, mode='r', encoding='utf-8') as file:
file.readline()
for line in file:
emps.append(Employee(*(line.strip().split(';'))))
return emps
return [Employee(*(line.strip().split(';'))) for line in file]
def write_csv(emps, sciezka):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment