Why "NONE" is come when my stack is print?.Please following code invoke in some other IDE for better experience it's my request.
class stack: def __init__(self): self.item=[] def is_empty (self): return self.item==[] def push (self, data): self.item.append(data) def pop(self): return self.item.pop() def display (self): x=s.item print (x,end="") s=stack() while True: print ("what do you want to do, 1=push, 2=pop, 3=exit") operation =int(input()) if operation==1: print ("how many element do you want to enter") number=int(input()) for I in range (number): s.push(int(input("enter the value: "))) print (s.display()) elif operation==2: if s.is_empty(): print ("stack is empty\n") else: print ("popped value is :",s.pop()) elif operation ==3: print ("Thank you!\n") break else: print ("please enter valid value\n")