print vs return in Python: Understanding the Difference

Most Python beginners don’t notice this. print() vs return They both “give output”. But they are not the same. print() 👉 Displays output on screen Example: print("Hello") return 👉 Sends value back from a function Example: def greet(): return "Hello" One shows output. One sends value. Understanding this will make your functions more powerful. 👉 Did you know this difference before? #BluJayTechnologies #Learning #Python #SoftwareCoaching

  • graphical user interface, text, application

To view or add a comment, sign in

Explore content categories