List formation in python
<p>I need to put 3 items in the list.</p>

<ol>
<li>state..eg(1,2)</li>
<li>action...eg..west</li>
<li>cost....5</li>
</ol>

<p><code>list=[(state,action,cost), (state,action,cost).........]</code></p>

<p>how can i make it in a form of list. For a particular state , action and cost is there. Moreover, if i need only state from the list, i should be able to extract it from the list.same thing goes for action too.</p>
