I have a text file that has a sequence of four characters a,b,c,d which is 100 lines long that I want to convert to a text string.
There are lines in the txt file that have asterisks that I want to skip entirely.
Here is an example of how the txt file can look. Note the third row has an asterisk where I want to skip the entire row
abcddbabcbbbdccbbdbaaabcbdbab
bacbdbbccdcbdabaabbbdcbababdb
bccddb*bacddcccbabababbdbdbcb
Below is how I'm trying to do this.
s = ''
with open("letters.txt", "r") as letr:
for line in letr:
if '*' not in line:
s.join(line)