Avatar ·

Méthode split en Python

📁 Sujets avancés sur Python, exemple, travail

Code :

  a =  input  (). split ()  print  (a)  

lors de la saisie de la ligne '1 2 3'

  Traceback (most recent call last): File  "" , line  1 ,  in  < module > a =  input  (). split () File  "< string >" , line  1   1   2   3  ^ SyntaxError: invalid syntax  

Quel pourrait être le problème ?