I'm trying to run the rearrange_name function to rearrange the variable "name" but i keep getting the "NoneType" error
I'm trying to run the rearrange_name function to rearrange the variable "name" but i keep getting the "NoneType" error Question: import re def rearrange_name(name): result= re.search(r’^([w.]*),([w.]*)$’, name) return ‘{} {}’.format(result[2], result[1]) print(result=rearrange_name(‘Lovely Ada’)) The NoneType error message Asked By: reminiscence || Source Answers: The space separating the groups is not being captured by your regex …