How can I print only the last value of the Dates written in the text? The input is a text file containing a lot of dates and I want the last date of the document.
Now my output is:
['1381566 ', '562 2486 3600 ', '511', '19', '799 e incluye sellado de tiempo y firma electr', '42', '031 ', '13 de Abril de 2018 ', '1 de 1 ', '1381566 ', '482', '25', '1613', '2339', '4831', '398', '2766', '1147', '15', '2741', '20 de ', '2018', '13 de marzo de 2018', '42006', '27 de marzo de 2018']
I only want: 27 de marzo de 2018
import re
f = open ('/Users/.../1381566.txt','r')
mensaje = f.read()
mensaje = mensaje.replace("\n","")
print re.findall(r'\d+[ \d\w]+', mensaje)