Customize . read() and . write() in Python

Asked

Viewed 69 times

0

I’m starting to learn Python and I came up with a question using with to open files, it is possible to pass arguments to the methods arquivo.read() to read a line and jump to the bottom line when a TAB or spaces is found?

For the writing I believe that arquivo.write(conteudo1, "\t", conteudo2) would solve.

  • And if there is content after whitespace?

  • But the intention is this, to do personalized research let’s assume that I have a file of a football team and want to take only the name of the athletes.

  • I believe you will need to do it manually. You can [Edit] the question and add a [mcve]?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.