+ 1
Is it correct to get input in the place of calling a func in python?
Eg: peri(L=int(input()) Where peri is a func already defined
2 Réponses
+ 1
Is L a keyword in your function peri()? Then it's a valid syntax. But still, it may be simpler to directly write
peri(int(input))
0
It should work.
Disadvantage: You can hardly do error handling, like when the user's input isn't intable.