Frage im Vorstellungsgespräch bei General Motors (GM)

A small coding task on string in Python, nothing tricky.