0
what is the difference between raise and print?
2 Answers
+ 1
Raising an errorĀ halts the entire program at that point (unless the exception is caught), whereasĀ printingĀ the message just writes something toĀ stdoutĀ -- the output might be piped to another tool, or someone might not be running your application from the command line, and theĀ printĀ output may never be seen.
+ 1
raise is used for raising exceptions. And print is used to for output