import os
from os import path
import datetime
from datetime import date, time, timedelta
import time
def main():
# Print the name of the OS
print(os.name)
# Check for item existence and type
print("Item exists: " + (str(path.exists("textfile.txt"))))
#print("Item is a file: " + str(path.isfile("textfile.txt")))
#print("Item is a directory: " + str(path.isdir("textfile.txt")))
if __name__ == "__main__":
main()
ERROR:
print ("Item exists: " + (str(path.exists("textfile.txt"))))
TypeError: 'str' object is not callable