programming-examples/python/Class/Python class which has two methods get_String and print_String.py

13 lines
274 B
Python
Raw Normal View History

2019-11-15 12:59:38 +01:00
class IOString():
def __init__(self):
self.str1 = ""
def get_String(self):
self.str1 = input()
def print_String(self):
print(self.str1.upper())
str1 = IOString()
str1.get_String()
str1.print_String()