python新手。似乎无法得到这个工作...语法错误无效,我该怎么办?
print = 'Press "U" and "Enter" for upper case.'
print = 'Press "L" and "Enter" for lower case.'
print = 'Press "C" and "Enter" for Capitalisation.'
letter = input("Please type a letter and press enter: ")
if letter == u: print '"THE MOST PROFOUND TECHNOLOGIES ARE THOSE THAT DISAPPEAR: THEY WEAVE THEMSELVES INTO FABRIC OF EVERYDAY LIFE UNTIL ARE INDISTINGUISHABLE FROM IT" [MARK WEISER, THE COMPUTER FOR THE 21ST CENTURY, SCIENTIFIC AMERICAN, SEPT. 1991]'
if letter == l: print '"the most profound technologies are those that disappear: they weave themselves into fabric of everyday life until are indistinguishable from it" [mark weiser, the computer for the 21st century, scientific american, sept. 1991]'
if letter == c: print '"The most profound technologies are those that disappear: they weave themselves into fabric of everyday life until are indistinguishable from it" [Mark Weiser, The Computer for the 21st Century, Scientific American, Sept. 1991]'
还我怎么能改善方案,使用户可以用另一个词替换一个词 。
使用'print'在py3.x的功能和不使用它作为一个变量名。 –
'print = ???'这是错误。 –
[Python 3打印时的语法错误]的可能的重复(http://stackoverflow.com/questions/826948/syntax-error-on-print-with-python-3) –