with tag

1 questions


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

© 2024 OneMinuteCode. All rights reserved.