Skip to content

Instantly share code, notes, and snippets.

@TGITS
Created January 15, 2024 12:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TGITS/425907e6bc34a1f6e2527c005fb16f66 to your computer and use it in GitHub Desktop.
Save TGITS/425907e6bc34a1f6e2527c005fb16f66 to your computer and use it in GitHub Desktop.
Exemple d'utilisation de la méthode reverse() des listes en Python
numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
print('liste de nombres :', numbers)
numbers.reverse()
print('liste de nombres après reverse() :', numbers)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment