Generation

generate functionThu, 15 Jun 2023

Receive the name of several participants and store them in a list

participants = [] def add_participant(participant): participants.append(participant) return participants add_participant('John') add_participant('Ella') # ['John', 'Ella'] add_participant('Mary') add_participant('David') # ['John', 'Ella', 'Mary', 'David']

Want to kickstart your project?Use the new AI Studio to create your code