python,用__import__()怎么写语句“from sys import stdin”?

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/12 13:25:39
python,用__import__()怎么写语句“from sys import stdin”?

python,用__import__()怎么写语句“from sys import stdin”?
python,用__import__()怎么写语句“from sys import stdin”?

python,用__import__()怎么写语句“from sys import stdin”?
他们都错了.
from sys import stdin之后你的这个scope的dict里是增加了stdin啊.
所以应该是:
temp=__import__('sys')
stdin=temp.stdin
del temp