Since Python 3, print
is no longer a statement, but a function. Thus, to use it, you would do print()
instead of print
.
Python 2.7:
print "Hello world!"
Python 3:
print("Hello world!")
You can read more about the print()
function at the docs, which also mentions some parameters you can include, and also how you can use it in python 2.x (from __future__ import print_function
)
Also, you're missing a colon after if o1 =="T"
. May just be a simple typo :).