python格式化字符串传变量

values = sys.argv[0]
print('Please enter at least one parameter')
Exaples = 'Exaples: python {key} 10 | python {key} 1-10'
print(Exaples.format(key=values))
sys.exit(1)

猜你喜欢

转载自blog.51cto.com/yht1990/2141187
今日推荐