Essentially what I want this code to do, is replace (systemType).clear() with either unix.clear or windows.clear. Is this even possible?
if(platform.system()=="Windows"):
systemType="windows"
else:
systemType="unix"
class unix:
def clear():
os.system('clear')
class windows:
def clear():
os.system('cls')
print("Detecing systemType")
time.sleep(1)
(systemType).clear()
The error is AttributeError: 'str' object has no attribute 'clear'