Slip 30 Q 2
CODE :
class stringmethod():
def __init__(self):
self.string=""
def get(self):
self.string=input("Enter string: ")
def put(self):
print("String is:")
print(self.string)
obj=stringmethod()
obj.get()
obj.put()
No comments:
Post a Comment