Generation

generate functionSat, 12 Nov 2022

remove the first word of a string separeted with comma and return the remaining words capitalized in a list

def myfunc(s): return [word.capitalize() for word in s.split(',')[1:]] myfunc('hello,world')

Questions about programming?Chat with your personal AI assistant