Question · Cours Python · Module 3: Programmation orientée objet

Type hint de retour

Comment annote-t-on le type de retour d'une fonction ?

Réponses possibles

  • def func() -> int:
  • def func() : int
  • def func() returns int:
  • int def func():

Tu vérifieras la bonne réponse en résolvant cet exercice dans le jeu CodeWorlds.