小编che*_*y84的帖子

os.system中的变量

os.system在Python中使用方法在Linux中打开文件.但我不知道如何在os.system命令中传递变量(a)

import os
a=4
os.system('gedit +a test.txt')
Run Code Online (Sandbox Code Playgroud)

如何在命令中将变量作为整数传递?

python

3
推荐指数
1
解决办法
1096
查看次数

标签 统计

python ×1