Generation

generate functionWed, 18 Jan 2023

Write a function that pulls the year number from the string: Example: string = 'Pulp Fiction (1994)' result 1994

def get_year(string): return string.split()[-1].strip(')') get_year('Pulp Fiction (1994)')

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