Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save evandrocoan/95952a467243d8fc866de6fc58f6d37d to your computer and use it in GitHub Desktop.
Save evandrocoan/95952a467243d8fc866de6fc58f6d37d to your computer and use it in GitHub Desktop.
#
# Licensing
#
# Snippet
# Copyright (C) 2018 Evandro Coan <https://github.com/evandrocoan>
#
# OS ARQUIVOS NESTE REPOSITÓRIO SÃO FORNECIDOS "NO ESTADO EM QUE SE ENCONTRAM", SEM GARANTIA DE
# QUALQUER TIPO, EXPRESSA OU IMPLÍCITA, INCLUINDO, MAS NÃO SE LIMITANDO ÀS GARANTIAS DE
# COMERCIALIZAÇÃO, APTIDÃO PARA UM PROPÓSITO ESPECÍFICO E NÃO INFRACÇÃO. EM NENHUMA CIRCUNSTÂNCIA, OS
# AUTORES OU TITULARES DE DIREITOS AUTORAIS SERÃO RESPONSÁVEIS POR QUALQUER RECLAMAÇÃO, DANOS OU OUTRA
# RESPONSABILIDADE, SEJA EM AÇÃO DE CONTRATO, DELITO OU DE OUTRA FORMA, DECORRENTE, DESTE OU
# RELACIONADO COM DOS ARQUIVOS DESTE REPOSITÓRIO OU O USO OU OUTRAS NEGOCIAÇÕES NO MODELO E SOFTWARE.
#
text="""BUILD 3156, 2, December, 2017
BUILD 3155, 30, November, 2017
BUILD 3154, 11, November, 2017
BUILD 3153, 1, November, 2017
BUILD 3152, 20, October, 2017
BUILD 3150, 17, October, 2017
"""
MonthsToDigit = \
{
'January' : 1,
'February' : 2,
'March' : 3,
'April' : 4,
'May' : 5,
'June' : 6,
'July' : 7,
'August' : 8,
'September' : 9,
'October' : 10,
'November' : 11,
'December' : 12,
}
for month in MonthsToDigit:
text = text.replace( month, str( MonthsToDigit[month] ) )
print( text )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment