Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Employee():
- def __init__(self, name, surname, salary):
- self.name = name
- self.surname = surname
- self.salary = salary
- def from_string(string):
- name = string[ : string.find("-")]
- help_str = string[string.find("-") + 1 : ]
- surname = help_str[ : help_str.find("-")]
- salary = help_str[help_str.find("-") + 1 : ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement