Martin:
for f in var1_fn, var2_fn, var3_fn:
if f.split('.')[0] == 'var1':
var1 = call_some_function(f)
.
.
.
etc
As usual I have big problems in understanding what you want to do.
Please, show an example of the contents of var1_fn, var2_fn, etc.
Hi,
I am trying to set the return value from a function to a name which I
grab from the for loop. I can't work out how I can do this without
using an if statement...
for f in var1_fn, var2_fn, var3_fn:
if f.split('.')[0] == 'var1':
var1 = call_some_function(f)
.
.
Martin wrote:
I am trying to set the return value from a function to a name which I
grab from the for loop. I can't work out how I can do this without
using an if statement...
for f in var1_fn, var2_fn, var3_fn:
if f.split('.')[0] == 'var1':
var1 = call_some_function(f)
.
Martin wrote:
Hi,
I am trying to set the return value from a function to a name which I
grab from the for loop. I can't work out how I can do this without
using an if statement...
for f in var1_fn, var2_fn, var3_fn:
if f.split('.')[0] == 'var1':
var1 = call_some_function(f)
On Wed, 29 Jul 2009 19:56:28 +0100, Martin mdeka...@gmail.com wrote:
Hi,
I am trying to set the return value from a function to a name which I
grab from the for loop. I can't work out how I can do this without
using an if statement...
for f in var1_fn, var2_fn, var3_fn:
if f.split('.')[0]
On Jul 29, 11:02 pm, Rhodri James rho...@wildebst.demon.co.uk
wrote:
On Wed, 29 Jul 2009 19:56:28 +0100, Martin mdeka...@gmail.com wrote:
Hi,
I am trying to set the return value from a function to a name which I
grab from the for loop. I can't work out how I can do this without
using an
30-07-2009 mdeka...@gmail.com wrote:
All I was trying to do was call a function and return the result to an
a variable. I could admittedly of just done...
var1 = some_function(var1_fn)
var2 = some_function(var2_fn)
var3 = some_function(var3_fn)
where var1_fn, var2_fn, var3_fn are just
Me wrote:
filenames = p'foo', 'bar', baz']
Sorry, should be of course:
filenames = ['foo', 'bar', baz']
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 29, 11:57 pm, Jan Kaliszewski z...@chopin.edu.pl wrote:
30-07-2009 mdeka...@gmail.com wrote:
All I was trying to do was call a function and return the result to an
a variable. I could admittedly of just done...
var1 = some_function(var1_fn)
var2 = some_function(var2_fn)
var3 =