Question d’entretien chez Hitachi Rail

Two Python questions involving string and array manipulation.