import sys
sys.argv[1] = a
print(sys.argv[1])
Why does a not come out but a different value...?
sys
It works well.
In [1]: import sys
In [2]: sys.argv[0]
Out[2]: '/home/allinux/workspace/lang/py36/bin/ipython'
In [3]: sys.argv[1]
Out[3]: '-i'
In [4]: sys.argv[1] = 'aaaaaaa'
In [5]: sys.argv[1]
Out[5]: 'aaaaaaa'
© 2024 OneMinuteCode. All rights reserved.