python - 我想用 open() 函数打开一个文件。为什么我收到 TypeError: 'str' object is not callable?
问题描述
我无法打开文件。
open('file.txt')
我有:
Traceback (most recent call last):
File "<ipython-input-60-f5022126236c>", line 1, in <module>
open('file.txt')
TypeError: 'str' object is not callable
解决方案
推荐阅读
- selenium-webdriver - org.openqa.selenium.SessionNotCreatedException: session not created: 这个版本的 ChromeDriver 只支持 Chrome 版本 79
- javascript - 如何在 Javascript 中将 PNG 转换为 SVG
- java - 从另一个类调用静态变量到可运行
- html - Bootstrap 4 确实有问题(导航栏和弹性对齐)
- python - Heroku Django 应用程序没有服务,因为 ModuleNotFoundError 崩溃:
(*不是需求模块*)? - selenium - 如何使用 selenium 点击这个按钮?
- javascript - onclick javascript函数不适用于div元素
- css - 我的 css first-child 伪选择器以相反的方式工作
- c - 虽然循环在C中被跳过
- list - F#关于打字的问题,float*float类型与'float'类型不匹配