Syntax error : invalid syntax words[] = my_func() | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

Syntax error : invalid syntax words[] = my_func()

Def my_func(): Print("hello world") My_func() I = 0 While(i <= 5): I = i + 1 Words [] = my_func() Print( words[]) Can anyone help please

7th Jul 2017, 5:14 AM
Krishnamoorthy Pillai
Krishnamoorthy Pillai - avatar
3 Réponses
0
first off, the Python keywords don't take a capital letter (but I understand they have been changed) second: what were you trying to do with "words [] = my_func()" ?
7th Jul 2017, 7:22 AM
Amaras A
Amaras A - avatar
0
I'm really sorry my phone auto corrected it to capital letters. Im trying to put the objects in the function in the list. Does it makes sense?
7th Jul 2017, 9:04 AM
Krishnamoorthy Pillai
Krishnamoorthy Pillai - avatar
0
I still don't understand... sorry
7th Jul 2017, 2:50 PM
Amaras A
Amaras A - avatar