Pergunta de entrevista da empresa Tech Mahindra

Python substring question i.e separate out the second word by name out of any two words given.