Reputation: 321
I have a simple task and want to run command from the line. E.g.
python3 -c 'print(2*2)'
The issue is when I want to invoke a function and pass parameter to it. E.g I want to lower the string 'ABC'. I use
python3 -c 'print(x="ABC",x.lower())'
Hence my question: how could I pass string value to function when invoke python from command line?
Upvotes: 1
Views: 145