0

Function calling error ?

I define a function that has one argument in a ".py" file . I access the folder with the command line. I run python on command line. I import the function and i call it with an argument that is random Why do i have an error telling me that the thing that wrote during is not defined ? This would be the role of a function, no ? Thank you

31st Oct 2019, 3:58 PM
Yifddude
3 Answers
0
*during calling
31st Oct 2019, 3:59 PM
Yifddude
0
Maybe you tried inputting into function variable name, not string? Instead of: func(somestr) You should: func('somestr') I didn't quite understand your question. If you want it to work, just write the function and operations with it in one .py file
31st Oct 2019, 4:10 PM
Asman-H
Asman-H - avatar
0
Thank you i will try that
31st Oct 2019, 7:23 PM
Yifddude