Typed input in python?
<p>I need to input 3 integers form stdin and outut their sum. Here's what i do:</p>

<pre><code>(n,l,k) = raw_input().split()
print n + l + k
</code></pre>

<p>Of course, i get <code>n</code>,<code>l</code>,<code>k</code> string concatenation, so i change this a little:</p>

<pre><code>(n,l,k) = raw_input().split()
print int(n) + int(l) + int(k)
</code></pre>

<p>Now it's ok. But <em>is there any way to set data type for the variables 'on the fly'</em>, so <code>n</code>,<code>l</code>,<code>k</code> became <code>int</code> whitout explicit reassigning for further use( i think of <code>n = int(n)</code> ) ?</p>

<p><strong>UPDATE:</strong></p>

<p>What if i need to input <code>int</code>, <code>string</code>, <code>int</code> (tuple items are of different types) ?
THis means i can't do</p>

<pre><code>(n,S,k) = [int(i) for i in raw_input().split()]
</code></pre>

<p>Any <code>zip()</code>, lambdas, accepting types?</p>

<p>Thanks in advance,
Ilya</p>
