Cathy James wrote:
f = open ('c:/testing.txt'', 'r')
replace the double quote by a single quote.
JM
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, May 24, 2011 at 1:31 AM, Cathy James wrote:
> dear mentor,
>
> I need help with my code:
In addition to what others have already said...
> please see my attempt below and help:
>
> #1) open file and display current file contents:
> f = open ('c:/testing.txt'', 'r')
> f.readlines()
> #2)
On Tue, May 24, 2011 at 6:31 PM, Cathy James wrote:
> s = input ('enter name: ').strip()
Are you using Python 2 or Python 3? If it's Python 2, this should be
raw_input().
> f = open ('c:/testing.txt', 'a')
> ...
> f = open ('c:/testing.txt', 'r')
You may be having trouble here a
On 24/05/2011 09:31, Cathy James wrote:
dear mentor,
I need help with my code:
1) my program won't display file contents upon opening
#1) open file and display current file contents:
f = open ('c:/testing.txt'', 'r')
f.readlines()
If you're running this in an interactive interpreter, I would
dear mentor,
I need help with my code:
1) my program won't display file contents upon opening
2) my program is not writing to file
3) my program is not closing when user presses enter- gow do I do this with
a while loop?
please see my attempt below and help:
#1) open file and display current fil