Yes "print" statement will not work when you are integrating python script in Automation Anywhere. "return" the final output that you want to fetch.
If you still want to verify the print statement executed, Go to Bot logs under "C:\ProgramData\AutomationAnywhere\BotRunner\Logs\Bot Launcher logs" and search for the expected print statement.