Re: How to only read words within brackets/ parentheses (in .txt file) using Python

2019-09-05 Thread pankaj . jangid
A S writes: > I understand that reading lines in .txt files would look something like this > in Python: > > > with open('filename','r') as fd: >lines = fd.readlines() > > > However, how do I run my code to only read the words in my .txt files that > are within each balanced parenthesis? > >

Re: How to only read words within brackets/ parentheses (in .txt file) using Python

2019-09-04 Thread Peter Otten
A S wrote: > I understand that reading lines in .txt files would look something like > this in Python: > > > with open('filename','r') as fd: >lines = fd.readlines() > > > However, how do I run my code to only read the words in my .txt files that > are within each balanced parenthesis? >

How to only read words within brackets/ parentheses (in .txt file) using Python

2019-09-04 Thread A S
I understand that reading lines in .txt files would look something like this in Python: with open('filename','r') as fd: lines = fd.readlines() However, how do I run my code to only read the words in my .txt files that are within each balanced parenthesis? I am not sure how to go about it