an example of class with callable instances import random random seed( class class xdef __init__selfarr self arr arr def get_num(selfi)return self arr[idef __call__(self)return self arr end of class definition xobj xrandom sample(range( , ) print(xobj get_num( )print(xobj() [ if you execute this codeyou will see the output shown in the commented out portions of the last two lines in the last line of the codenote how we are calling the function call operator '()on the instance constructed from the class purdue university