实现下列数据去重:13. A police officer claimed that the young man had attempted to_________paying his fare. A. avoid B. reject C. refuse [答案] A13. A police officer claimed that the young man had attempted to_________paying his fare. A. avoid B. reject C. refuse [答案] A
时间: 2024-03-04 21:49:02 浏览: 150
假设数据存储在一个名为data的列表中,可以使用以下代码实现去重:
```python
data = ['13. A police officer claimed that the young man had attempted to_________paying his fare. A. avoid B. reject C. refuse [答案] A', '13. A police officer claimed that the young man had attempted to_________paying his fare. A. avoid B. reject C. refuse [答案] A']
data = list(set(data))
```
其中,set函数可以去除列表中的重复元素,然后再通过list函数将其转换为列表类型。最终得到的data列表就是去重后的结果。
阅读全文