readline tag

4 questions


2 answers
137 views
0
If \n is added when creating a new file after reading the Python file readline

Code to create a new file called test.csv by reading a file called test.csv. Delete the other parts and upload only the problematic parts. As a result, I solved it in a different way, but I have a que...

1 years ago

1 answers
108 views
0
Why is C++ slower to read than Python?

I ran a program that receives a line from stdin in Python and c++C++ is much slower.Isn't Python usually much slower?Is it because I made the code weird?I don't know what's wrongI ran it on OS X (10.6...


1 answers
124 views
0
How to replace InputStream with BufferedReader

I wrote InputStream to read text line by line from Android Asset Folder.If I use Buffered Reader, I can use readLine(), so I want to change InputStream to Buffered ReaderWhat should I do?InputStream i...


1 answers
70 views
0
readlines readline

Save it to a variable called code to open the file '''def searching(name):code.seek(0, 0)lines = code.readlines()for line in lines: item = line.split() if name in item: return lineprint searching ('N...

1 years ago

© 2024 OneMinuteCode. All rights reserved.