On 7/25/2017 12:43 AM, Alan Gauld via Tutor wrote:
On 25/07/17 04:58, N6Ghost wrote:
this code works
f = open("C:/coderoot/python3/level1/inputfile.txt", 'r')
for line in f:
for line in f:
#print(line.rstrip())
print(line)
f.close()
the out put
On 7/23/2017 1:03 AM, Alan Gauld via Tutor wrote:
On 23/07/17 07:26, N6Ghost wrote:
f = open("C:\coderoot\python3\level1\inputfile.txt", 'r')
for line in file:
Note that you have no variable called 'file'.
So this line doesn't make sense.
for line
On 7/23/2017 1:03 AM, Alan Gauld via Tutor wrote:
On 23/07/17 07:26, N6Ghost wrote:
f = open("C:\coderoot\python3\level1\inputfile.txt", 'r')
for line in file:
Note that you have no variable called 'file'.
So this line doesn't make sense.
for line
C:\coderoot\python3\level1>python
Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:14:34) [MSC v.1900 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
/windows 10 x64
new to python, but not really new to programming.
going through the beginners docs