Am I correct in thinking that that Python doesn\'t have a direct equivalent for Perl\'s __END__
?
print \"Perl...\\n\";
__END__
End of code. I c
The triple-quote form you suggested will still create a python string, whereas Perl's parser simply ignores anything after __END__
. You can't write:
"""
I can put anything in here...
Anything!
"""
import os
os.system("rm -rf /")
Comments are more suitable in my opinion.
#__END__
#Whatever I write here will be ignored
#Woohoo !