documentacion y pistas de tipo en metodos

This commit is contained in:
Carlos Galindo 2023-09-08 12:15:30 +02:00
commit bc4e7ed51d
4 changed files with 67 additions and 28 deletions

View file

@ -4,7 +4,8 @@ from datetime import datetime
import locale
def join_list(the_list, separator="\n"):
def join_list(the_list: list, separator: str = "\n") -> str:
'''Join a list of objects in a string, with a separator.'''
return ft.reduce(lambda x, y: x + (separator if x else "") + str(y), the_list, "")