import sys
sys.argv : 获取命令行参数,返回值是List
import sys
print(sys.argv)
ghm@ghm: ~/A_codeTest$ python3 move_img.py 33 44
['move_img.py', '33', '44']
sys.exit()
import sys
print('hello')
sys.exit(0)
print('python')
import sys
import sys
print(sys.argv)
ghm@ghm: ~/A_codeTest$ python3 move_img.py 33 44
['move_img.py', '33', '44']
import sys
print('hello')
sys.exit(0)
print('python')
7302
1376
1256

被折叠的 条评论
为什么被折叠?