newbie apply() question
Roman Suzi
rnd at onego.ru
Tue Jul 3 01:12:51 EDT 2001
On Tue, 3 Jul 2001, Aaron Edsinger wrote:
> hi. i'm stumped on something that seems easy. why doesn't this work:
import sys
> x=4
> apply(sys.stdout.write,x) #fails
> apply(sys.stdout.write,(x,)) #fails
>
> is there a way to make this work?
probably, x must be a string. Then variant 2 will work fine.
> thanks,
> aaron
>
Sincerely yours, Roman A.Suzi
--
- Petrozavodsk - Karelia - Russia - mailto:rnd at onego.ru -
More information about the Python-list
mailing list