I have a very basic basis that I would like to highlight the main words of each row in a prioritization list, eg:
Basis:
Bom dia
que dia lindo
vamos embora
vamos chutar o dia
Priority list: bom dia vamos lindo
Expected result:
Bom dia - Bom
que dia lindo - Dia
vamos embora - vamos
vamos chutar o dia - dia
I was able to find only one variable and not a list. Code:
texto = 'dia'
for lin in open(r"C:\Users\guilgig\Desktop\teste.txt"):
if texto in lin:
print (texto, lin)