linux下运行python脚本,屏幕上输入一行字符,怎么显示这个脚本的结果呢?按回车不显示结果呀 10
linux下的python脚本如下:#!/user/bin/envpythonimportsysforlineinsys.stdin:line=line.strip()w...
linux下的python脚本如下:
#!/user/bin/env python
import sys
for line in sys.stdin:
line = line.strip()
words = line.split()
for word in words:
print "%s\\t%s" % (word,1) 展开
#!/user/bin/env python
import sys
for line in sys.stdin:
line = line.strip()
words = line.split()
for word in words:
print "%s\\t%s" % (word,1) 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询