私はマークを含む答えの配列を持っています。テキスト配列を分割する方法は?
構文 - 。[ "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"]
私はそれをどのように行うのですこれらを分割し、各回答のためのマークを抽出する必要が
?たとえば
あなたは、文字列で作業しているドキュメントにはいくつかのポインタであるので、最初のピットストップは、[Sだろうtring methods](http://docs.python.org/library/stdtypes.html#string-methods)、特に 'split'メソッドです。あなたもリストを使って作業しているので、['for'文](http://docs.python.org/tutorial/controlflow.html#for-statements)や[list comprehensions](http: /docs.python.org/tutorial/datastructures.html#list-comprehensions)。 –