我有一系列的答案,包括标记.
语法 - ["ANSWER1 | MARK1,ANSWER2 | MARK2 ...]
answers = ["Human machine interface for lab abc computer applications|3",
"A survey of user opinion of computer system response time|4",
"The EPS user interface management system|2",
"System and human system engineering testing of EPS|1"]
Run Code Online (Sandbox Code Playgroud)
我需要拆分这些并为每个答案提取标记.我该怎么做 ?
例如:
>>> [a.split("|") for a in answers]
[['Human machine interface for lab abc computer applications', '3'],
['A survey of user opinion of computer system response time', '4'],
['The EPS user interface management system', '2'],
['System and human system engineering testing of EPS', '1']]
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
90 次 |
| 最近记录: |