beginners syntax question

tony clarke a.clarke11 at ntlworld.com
Sat Apr 6 14:36:43 EST 2002


Hi

Try listing the objects  l=["object1','object2'..]
then
for i in l:
 i.update()

Another newbie, so treat with caution:-]
Tony

Tony wrote:

> Hi,
>
> I'm trying to call the update() method of several objects ie:
>
> object1.update()
> object2.update()
> etc
>
> I'd really like to do
>
> for x in range(7):
>   "object"+str(x).update
>
> but can't figure outthe syntax, is this possible?
>
> Thanks
> Tony




More information about the Python-list mailing list