When I call the mainfile, the below mention validate functions do not execute as expected. What changes shall I make with the mainfile so that the validate methods execute themselves?
x = input('enter a number')
def mainfile(data):
def validate(self,data):
if int(data) > 3:
print( 'greater than 3')
def validate1(self, data):
if int(data) > 2:
print( 'greater than 2')
mainfile(x);