> If we want to create a text file and write some text into it we use the
> following command in Python:
>
> myfile = open("test.txt","w") "urn:schemas-microsoft-com:office:office" />
>
> myfile.write("hello world")
>
> But what if instead of writing the text 'hello world', i want to write
> the
[forwarding to Tutor]
-- Forwarded message --
Date: Sat, 01 Jul 2006 13:58:47 +0400
From: Hafsa raza <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: [Tutor] saving output in a text file
Thank you for the quick reply. Let me put my question in a more
clearer way f
>def double(s):
>"double: string -> string
>doubles up the input string s."
>return s + s
Gaah. Typos. My apologies. Here's a correction to double()
def double(s):
"""double: string -> string
Doubles up the input string s. For example, double("
Hi Hafsa,
> Can you guide me how to save the output returned by a regular expression
> group, into a text file? for instance for the following regular
> expression:
[regex cut]
> If the above regular expression is searched for in a file, how can i
> save the output matches from the group "na
Hi, my name is Hafsa
I am new to programming in Python. Basically i am working with regular _expression_ matching using Python. I have a problem with saving output from the regular _expression_ matches in a text file. Can you guide me how to save the output returned by a regular _expression_ grou