【发布时间】:2012-07-30 21:12:34
【问题描述】:
print'Personal information, journal and more to come'
x = raw_input()
if x ==("Personal Information"): # wont print
print' Edward , Height: 5,10 , EYES: brown , STATE: IL TOWN: , SS:'
elif x ==("Journal"): # wont print
read = open('C:\\python\\foo.txt' , 'r')
name = read.readline()
print (name)
我启动程序并显示"Personal information, journal and more to come",但是当我输入Personal information 或journal neither 时,它们会打印结果并且我没有收到任何错误。
【问题讨论】:
标签: python printing if-statement