Oi
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

24 lines
377 B

namesStations = []
completeList = []
with open('listeBhfe') as doc:
for line in doc:
completeList.append(line.split())
for array in completeList:
if array[-1][0] == '(' and array[-1][-1] == ')':
namesStations.append(array)
namesList = []
for namearray in namesStations:
if len(namearray) < 4:
namesList.append(' '.join(namearray[0:-1]))
print(namesList)