open tag

5 questions


1 answers
69 views
0

1 answers
85 views
0
What is the difference between open() and with statement when reading a file?

When reading a file,We usually use open(filename, r) or with open(filename) as fileIs there a big difference between the two?on a foreign siteIt(with statement) is designed to provide much cleaner syn...

1 years ago

1 answers
121 views
0
I have a question regarding Python's open function.

1. Is the open function and the open method of the io module the same? Or are they similar functions but separate functions?2. When opening a file with an open function and reading the contents of the...

1 years ago

1 answers
105 views
0
I read a text file in Python, and I wonder how to read it from a specific line

For example, like thisReports Contents Number Name Gender 1 Hong Gil-dong Nam 2 Kim Chul-soo Nam 3 Lee Young-hee female When text is written like this, if you're trying to get only gender content, how...

1 years ago

1 answers
118 views
0
Find the average, maximum, of the three groups separated by a specific delimiter in the txt file

Notepad file txt file ======1.234234453==============2323343=======In this way, we have to divide into three groups according to ====== and find the average or maximum value of those values, but I'm n...

1 years ago

© 2024 OneMinuteCode. All rights reserved.