One more basic question on my part. I am 'Pythonista' super basic level and am trying to simply read a text line by line and make a split
each time I find a punctuation mark or a space.
I tried this:
import re
with open('est.txt', 'r') as f:
for ligne in f:
ligne=re.split('; |, |\s|\.|\n')
print (ligne)
I just got the following error:
Traceback (most recent call last): File "C:/Users/Janaina/Desktop/exo/stats_python/estpy.py", line 5, in <module> ligne=re.split('; |, |\s|\n') TypeError: split() missing 1 required positional argument: 'string'
Can anyone help me? I know it's something super basic, but I've been blocked for some time looking for the answer ...