1) print :
print is a statement in python, it supports in the 2.x version of python.
syntax:
print message
example:
we are executing this statement in latest version of python.
>>> print 'hello python'
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('hello python')?>>>
so this statement is only execute in 2.x python versions.
2) print() :
print the given object to the standard output device. it supports in python 3.x version onwards.
syntax:
print("message")
example:
>>> print("message")
message>>>
No comments:
Post a Comment