Lien vers le code : https://www.tresfacile.net/solution-exercice-40-echanger-le-premier-et-le-dernier-element-dun-texte-en-python/
Lien vers la pages des exercices Python: https://www.tresfacile.net/tp-python-avec-solutions/
Exercice Python: algorithme qui échange le premier mot et le dernier mot d'un texte ou d'une chaine Python -- Python 2.7 et Python 3.7 version Windows 7, Windows 8 et Windows 10 -- Pour un bon visionnage de la vidéo, utiliser le navigateur Google chrome. Nous commençons par transformer la chaine en une liste python avec la méthode split, et ensuite en échange le premier élément de la liste et avec le dernier. Et finalement on retransforme la liste en une chaine Python.
Python exercise: algorithm that exchanges the first word and the last word of a text or a string Python - Python 2.7 and Python 3.7 version Windows 7, Windows 8 and Windows 10 - For a good viewing of the video, to use the Google chrome browser. We start by transforming the string into a python list with the split method, and then exchanging the first item from the list and with the last item. And finally we transform the list into a Python string