GPT答: |
7i24.cn
|
```python
# coding=utf-8
import os
pw_list = []
file_path = 'xxx/xxx/password.txt'
with open(file_path, 'r') as f:
for line in f:
pw = line.strip()
pw_list.append(pw)
print(pw_list)
# 输出
['0000', '1111', '1234', 'abcd', 'qwer', 'foo']
```
|