I want to apply "Full inverse" so srt files maminly in arabic, I am able to read the file and store it in a list :
file1 = open('myFile.txt', 'r')
Lines = file1.readlines()
count = 0
strings=[]
# Strips the newline character
for line in Lines:
count += 1
#print("Line{}: {}".format(count, line.strip()))
strings.append(line)
the issue is what could be the solution to apply the full inverse to only the text from the file and not the time stamp or the numbered line like this pic srt file
the pattern with srt files is that first it has the numbered line for example " 1 " then the next line has the time " 00:00:00,166 --> 00:00:02,233 ", then it has the text it self, but the after the first line all srt has empty line then it start with number "2", what i though of is to skip 2 lines always and inverse the third but this patter not valid. Any idea ?
I tried to apply a pattern of skipping 2-3 lines then inverse the third but that patter is not valid