def data_to_change(cls, person): ''' Handles choosing which data to change. ''' choosing = True while choosing: Ui.print_data_list('Data list: ') choice = Ui.get_inputs(["Enter a number or 'q' to go back: "], 'Which data do you want to edit?') if choice[0] == '1': return cls.edit_name(person) elif choice[0] == '2': return cls.edit_surname(person) elif choice[0] == '3': return cls.edit_email(person) elif choice[0] == 'q': choosing = False else: Ui.print_message('There is no such option.') time.sleep(3)