Web appOpen in Telegram

Post🧠 return vs print() in Python

30 September 2026
P
Python Learning
Photo
click to show
🧠 return vs print() in Python These are not interchangeable. def add(a, b): print(a + b) Calling: result = add(2, 3) prints: 5 But: result is actually: None Now compare: def add(a, b): return a + b This time: result = add(2, 3) gives: result == 5 print() sends something to the screen. return sends a value back to the caller. That distinction becomes extremely important once functions start calling other functions.
2 Β· 254 Β·

Nearby in the feed

PPython LearningThe tell() function in Python 🐍 The tell() function returns the current position of the file pointer within the data stream. It is most often used when working PPython LearningPYTHON SKILL ROADMAP β”‚ β”œβ”€β”€ πŸ“ Python Basics β”‚ β”œβ”€β”€ πŸ“ Variables & Data Types β”‚ β”œβ”€β”€ πŸ“ Input & Output β”‚ β”œβ”€β”€ πŸ“ Operators β”‚ β”œβ”€β”€ πŸ“ Conditional Statements β”‚ └── πŸ“ Loops
this message
PPython Learning🐍 Python Beginner NotesPPython LearningPhoto
PPython LearningPython Learning@python_bds Β· channel Β· Tech
5Β 755subscribers537average post reach
Venue feed Open in Telegram

An open public feed from the search index ChatCrawler β€” β€œGoogle for public Telegram”; refreshed as the venue is crawled. Times are UTC.

Public content only, official Telegram API. About Β· FAQ Β· What we do not do Β· Remove a page Β· Catalog Β· Search Β· How we count