UrbanPro

Learn Python Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

What is the difference between Print and return in Python? When to use it?

Asked by Last Modified  

4 Answers

Learn Python

Follow 7
Answer

Please enter your answer

20 years of experience teaching Informatics Practices, Python, Pandas, Matplotlib, C language

Well they are two absolutely different statements. While the print statement is used to print and output on the shell the return statement is used to return some value from a function. Return is only used with functions when we want to return a value to the calling function while print can be used whenever...
read more

Well they are two absolutely different statements. While the print statement is used to print and output on the shell the return statement is used to return some value from a function. Return is only used with functions when we want to return a value to the calling function while print can be used whenever want to display output.

read less
Comments

Corporate Trainer with 6 Years of Experience.

Print function can be used inside as well as outside the function. But, return can be used in side a function. Return only computes the value, it will not show the value, to do that, you need to use print.
Comments

Maths tutor with 7 years experience

Printing means displaying a value in the console. To print a value in Python, you call the print() function..Returning is used to return a value from a function and exit the function.
Comments

Software Trainer with 12 years of IT experience and 9 years teaching experience

Print to print something on to the monitor Return is used to make the value of a local variable available globally
Comments

View 2 more Answers

Related Questions

What is the best IDE for Python?
The best IDE for Python often depends on personal preference and specific needs. Here are some top choices: 1. **PyCharm**: A powerful IDE with features like code completion, debugging, and integrated...
Irfan
0 0
5
Which is better: Python or Ruby?
The choice between Python and Ruby depends on your goals and preferences. **Python** is widely favored for its simplicity, readability, and versatility, making it ideal for web development, data science,...
Praveen
0 0
6
What is a beginner's guide to Python programming?
A beginner’s guide to Python programming starts with learning the basics, such as syntax, variables, data types, loops, and conditionals. Next, focus on understanding functions, modules, and key...
Dharmendra
0 0
6
I am web developer with HTML and CSS knowledge, want to move a step ahead in programming web/desktop/mobile applications, which language is better, Python, Java or C#?
With knowledge of only HTML and CSS, Java and C# would be very difficult to catch up. Choose Python not just because it is easy but more relevant when combined with Django web framework. Even job opening...
Thomas

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Identity operators
Identity operators Operation Syntax Function Identity a is b is_(a, b) Membership operators Operation Syntax Function Containment obj in seq contains(seq, obj)

Be prepared to get trained--init
Before starting the training,students must be mentally prepared for acceptance of new knowledge. Students must attend training with open minded forgetting the position they are working.This will help...
S

Smartnub Softsolutions

0 0
0

Why Do People Choose Python?
Lot of programming languages are available in the market today, but why do people choose python over them? What made it different from other scirpting languages. So factors made it unique, as below: Software...

Built-In Functions (Python)
Built-in Functions: The Python interpreter has a number of functions built into it that are always available. They are listed here in alphabetical order. Built-in Functions abs() divmod() input() open() staticmethod() all() enumerate() int() ord() str() any() eval() isinstance() pow() sum() basestring() execfile() issubclass() print() super() bin() file() iter() property() tuple() bool() filter() len() range() type() bytearray() float() list() raw_input() unichr() callable() format() locals() reduce() unicode() chr() frozenset() long() reload() vars() classmethod() getattr() map() repr() xrange() cmp() globals() max() reversed() zip() compile() hasattr() memoryview() round() __import__() complex() hash() min() set() ...

Topics covered in Python Basics course
Chapter 1: Introduction Introduction to Python Setting up path Chapter 2: Variable Integer String Operators (Arithmetic, logical, relational) Chapter 3: Data Structure Tuple List Dictionary ...

Recommended Articles

Python is one of the most popular programming languages in the world. It is general-purpose, object oriented, high-level programming language used in a number of programming fields. Python is a great programming language to learn as it will introduce you to the world of programming. If you are from the technical background...

Read full article >

Whether it was the Internet Era of 90s or the Big Data Era of today, Information Technology (IT) has given birth to several lucrative career options for many. Though there will not be a “significant" increase in demand for IT professionals in 2014 as compared to 2013, a “steady” demand for IT professionals is rest assured...

Read full article >

Information technology consultancy or Information technology consulting is a specialized field in which one can set their focus on providing advisory services to business firms on finding ways to use innovations in information technology to further their business and meet the objectives of the business. Not only does...

Read full article >

Hadoop is a framework which has been developed for organizing and analysing big chunks of data for a business. Suppose you have a file larger than your system’s storage capacity and you can’t store it. Hadoop helps in storing bigger files than what could be stored on one particular server. You can therefore store very,...

Read full article >

Looking for Python Training classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Python Training Classes?

The best tutors for Python Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Python Training with the Best Tutors

The best Tutors for Python Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more