Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created December 10, 2018 06:39
Show Gist options
  • Save parzibyte/c61406676dfb2d59840ad8070f6fdc7c to your computer and use it in GitHub Desktop.
Save parzibyte/c61406676dfb2d59840ad8070f6fdc7c to your computer and use it in GitHub Desktop.
Split y el segundo argumento created by parzibyte - https://repl.it/@parzibyte/Split-y-el-segundo-argumento
cadena = "Hola mundo estamos explicando el funcionamiento de split en Python"
separador = " "
maximo_numero_de_separaciones = 2
separado_por_espacios = cadena.split(separador, maximo_numero_de_separaciones)
print("Separado por espacios es:", separado_por_espacios)
# ['Hola', 'mundo', 'estamos explicando el funcionamiento de split en Python']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment