Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python的readlines不是迭代器,是一个list #39

Open
franklingu opened this issue Sep 28, 2017 · 2 comments
Open

python的readlines不是迭代器,是一个list #39

franklingu opened this issue Sep 28, 2017 · 2 comments

Comments

@franklingu
Copy link

这个在2和3里都是list

In [2]: lll = open('cnmb_worker.conf').readlines()

In [3]: type(lll)
Out[3]: list

In [4]: len(lll)
Out[4]: 31

In [5]: len(lll)
Out[5]: 31
@zhanglei1032
Copy link

确实是这样,答案写错了

@iakirago
Copy link

验证了,确实是<class 'list'>, 验证版本python3.10.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants