by: Leeds, Mark |
last post by:
I did more investigation into my previous problem
and what happens is that my text file has \r for representing
a new line instead
of a \n. is there a way to tell the readlines
function that the...
|
by: Richard |
last post by:
Hi,
Can anyone tell me what the difference is between
for line in file.readlines( ):
and
for line in file:
|
by: Yong Wang |
last post by:
Hi,
I use readlines() to read one data file. Python automatically parses the read contents
into a list of lines. When I used list to print out the 1st line, it is ok. When I use
the list index 2...
|
by: wordsender |
last post by:
Hey guys,
I can't figure this one out, why is this simple script giving me
problems?
logfile=file(r'test.txt','w')
logfile.write('datetime')
test=logfile.readlines()
When I run it I get...
|
by: vch |
last post by:
Does a call to file.readlines() reads all lines at once in the memory?
Are the any reasons, from the performance point of view, to prefer
*while* loop with readline() to *for* loop with readlines()?
|
by: Ross Reyes |
last post by:
HI -
Sorry for maybe a too simple a question but I googled and also checked my
reference O'Reilly Learning Python
book and I did not find a satisfactory answer.
When I use readlines, what...
|
by: wscrsurfdude |
last post by:
Ik have an uml file I want to read with readlines. I have the following
code:
infile = open("out2.txt","r")
for line in infile.readlines():
print line
The print statement just gives the data,...
|
by: Wojciech Gryc |
last post by:
Hi,
I'm currently using Python to deal with a fairly large text file (800
MB), which I know has about 85,000 lines of text. I can confirm this
because (1) I built the file myself, and (2)...
|
by: Nikhil |
last post by:
Hi,
I am reading a file with readlines method of the filepointer object
returned by the open function. Along with reading the lines, I also need
to know which line number of the file is read in...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|