How to add a current string into an already existing list
Nick the Gr33k
nikos.gr33k at gmail.com
Tue Nov 5 10:50:04 EST 2013
Στις 5/11/2013 5:45 μμ, ο/η Tim Chase έγραψε:
> On 2013-11-05 17:39, Nick the Gr33k wrote:
>>>>> data = infile.readlines
>
> You're assigning it to the bound function rather than calling the
> function. Use the "call" operator:
>
> data = infile.readlines()
>
> -tkc
>
>
--
>>> infile=open("myfile.txt")
>>> data = infile.readlines()
>>> for line in data:
... print( line )
...
nikos pts/0 Nov 5 09:57 (176.92.96.218)
>>>
Thanks Tim.
So i see here 2 lines, first being the file contenat's themselves and
the last one being an empty line.
I can't relate this to the NoneType error iam having in my script.
More information about the Python-list
mailing list