**
笨办法学python 13-14疑问
在笨办法的13里“script, one, tow, three = argv”中需要保留的是script, *, *, * = argv“
而在后面的行代码
print “The script is called:”, script
print “Your variable is:”, one
print “Your variable is:”, tow
print “Your variable is:”, three
甚至可以只保留
print script
print one
print tow
print three
那么script, *, *, * = argv“是什么?
而在笨办法14里
print “Hi %s, I’m the %s script.” % (user_name, script)
为什么script可以直接将文件名ex14.py表达出来?
不,这就是一个问题,在13里就有script表示出了文件名,那为什么难道script在python里的能力就是表达文件名吗?还是什么原因?在去改改代码看看。
原来如此,并不是script表达了文件名而是有四个变量名,包括了script,而那四个变量名就从PS C:\Users\axu\test> python 后面开始就是变量而已。。