问题描述
这个游戏的新手。尝试了以下内容。
data = raw_input(" Type something")#spaces"
myInput = data
print" you typed" myInput#再次
print"第四个字符是'myInput [3]#再次
当我在shell中运行它时出现错误警告第二条评论
(实际上指向myInput的t)如果我删除评论,我会得到
第三条评论。有什么不对吗?
肯。
Hi,
New to this game. Have tried the following.
data=raw_input("Type something ") # spaces after "something"
myInput=data
print "You typed " myInput # and again
print "The fourth character is "myInput[3] # and again
When I run it in the shell I get error warnings for the second comment
( actually pointing to the t of myInput ) If I remove the comment I get
one for the third comment. What is wrong please?
Ken.
推荐答案
打印声明为:
print item1,item2 ....
The print statement is :
print item1, item2 ....
这篇关于#评论的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!