What is the difference between a function and a method python?



What is the difference between a function and a method python?..

Answer / Kapil Kumar Singh

In Python, functions are standalone entities while methods belong to a specific class. A method has access to the properties and methods of its associated class. Functions can be used independently of any class, but they do not have the same level of direct access.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

What are the disadvantages of Python Recursion?

1 Answers  


Explain about exceptions in python?

1 Answers  


What should I make with python?

1 Answers  


Purpose of "/" and "//" operator in python?

1 Answers  


Explain what is decorator?

1 Answers  


How will you get the length of the string?

1 Answers  


How to check the string consists of alphanumeric characters ?

1 Answers  


What are the features of python?

1 Answers  


Can you build web apps with python?

1 Answers  


Optionally, what statements can you put under a try-except block?

1 Answers  


Can we override a constructor?

1 Answers  


Tell me the use of // operator in python?

1 Answers  


Categories