How to use variable in a file name

Andre Engels andreengels at gmail.com
Tue Sep 29 09:43:10 EDT 2009


On Tue, Sep 29, 2009 at 3:35 PM, kks <kkis.theking at gmail.com> wrote:
> if myFile variable contains the actual filename then how can i open a
> file for wirte so that complete filename appears as
> "actualname_kks.txt"

open(myFile + "_kks.txt", "w")

-- 
André Engels, andreengels at gmail.com



More information about the Python-list mailing list