Q:

I want to split a text by dot and space, the code is posted its giving me an error "str object cannot be interpreted as an integer"

the code is posted its giving me an error "str object cannot be interpreted as an integer" is there anyone who can fix ?
file =  open(r'C:\Users\Raja Arsalan\Desktop\read_file.txt')

for i in file:
     words= i.rstrip()
     print("FRIST WORD" ,words)

     letter = words.split("."," ")
     print(letter)

A:

import re
file =  open(r'C:\Users\Raja Arsalan\Desktop\read_file.txt')
for i in file:
     words= i.rstrip()
     print("FRIST WORD" ,words)
 #letter = words.split(".")#," ")
 letter = re.split('. |  ',words)
 print(letter)

