Advertisement
575

some shit

575
Mar 5th, 2019
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1.  
  2.  
  3. #print('\tФИO\nИванов Иван Иванович' )
  4.  
  5. headline = '\tФИО\t\t\tКатегория\t\t\tВозраст'
  6.  
  7. class Student:
  8. def __init__(self):
  9. self.full_name = str
  10. self.category = str
  11. self.age = str
  12.  
  13. def add_full_name (self, items):
  14. self.full_name = ' '.join(items[:3])
  15. for i in range (3):
  16. items.pop(0)
  17.  
  18. def add_category (self, items):
  19. self.category = items.pop(0)
  20.  
  21. def add_age (self, items):
  22. self.age = items.pop(0)
  23.  
  24. def create_out (self):
  25. return self.full_name + '\t' * 2 + self.category + '\t' * 3 + self.age
  26.  
  27.  
  28. data = ''.join(input().split('_')[1:]).split(';')
  29. output = list()
  30. for i in range (len(data) // 5):
  31. student = Student()
  32. student.add_full_name(data)
  33. student.add_age(data)
  34. student.add_category(data)
  35. output.append(student.create_out())
  36.  
  37.  
  38. print(headline)
  39. for line in output:
  40. print(line)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement