How to define an interface in Python?
There is no interface of abstract class keyword in Python. Actually there is no notion of interface per se in Python (as opposed to Java, for example). Python uses abstract classes to declare interfaces. Abstract class can be defined in a following manner: from abc import ABC

class AbstractOperation(ABC):

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Python quizzes
Sign Up Now
or Subscribe for future quizzes