Splitting strings using a delimiter in python
<p>OK so I have a string that has this:</p>

<pre><code>Dan|warrior|54
</code></pre>

<p>I'm trying to make so I can use python and split it using <code>|</code> as the delimiter. Here's what I have so far:</p>

<pre><code>#!/usr/bin/env python
dan = 'dan|warrior|54'
print dan.split('|')
</code></pre>

<p>and that results into this:</p>

<pre><code>['dan', 'warrior', '54']
</code></pre>

<p>I know it's incomplete but what do I have to do to finish it? Yes, I tried googling this problem... but it's not happening. :(</p>

<p>I want so that I can choose specifically which one from the delimiter so if I was <code>dan.split('|')[1]</code> .. it would pick <code>warrior</code>. See my point?</p>
