How can I input the parameter to my py via cmd and include '&' symbol?
for example, I'd like to input the parameter in cmd like this:
python test.py Test test2&test3 "test4"
I suppose to get 'Test' by sys.argv[1], 'test2&test3' by sys.argv[2], '"test4"' by sys.argv[3]
However when I try it, it throw error
brand = user_input[1]
IndexError: list index out of range
'test3' is not recognized as an internal or external command
I think the reason will be '&' symbol was trigger as 'end' something (not sure & meaning in python cmd) so it end the input of sys.argv
I tried input it like test2&test3, test2\&test3 . But still not work.
It's possible for me to input & as my program parameter from cmd?