我是一个新的 Python 用户,非常感谢一些帮助。我的代码如下:
from sys import argvs
script, mum_mood, dad_mood = argvs
我自己的功能
def dad_and_mum_mood(mum_mood, dad_mood):
print "If both mum and dad are in a good mood, all is good."
print "If one is and one isn't, all is good."
print "If both are in a bad mood, not so good."
print "Mum is in a %s mood" % (mum_mood)
print "Dad is in a %s mood" % (dad_mood)
print "Where does that leave us?"
?
dad_and_mum_mood(mum_mood, dad_mood)
我只是想从s 获取信息(写入命令行),但我得到了mum_mood
错误。dad_mood
argv
ImportError: cannot import name argvs
你知道为什么这不起作用吗?非常感谢你帮助我。
亲切的问候