When I write to a text file in python 3.5.1 the text file is blank
Question: I'm writing to a text file but the final content is blank. Can anyone help.

    
    
    def main():
        types = input('What is the device type? Phone or Tablet')
        save = open('type.txt', 'w')
        save.write(types)
        save.close
        if types == 'phone':
            import Type1
        elif types == 'tablet':
            import Type2
        else:
            main()
    
    main()
    

I've tried what I could but I'm not an expert on python.


Answer: In Python every method call is with parentheses. Just use `save.close()`.

