Skip to content

Instantly share code, notes, and snippets.

View fabiogaluppo's full-sized avatar

Fabio Galuppo fabiogaluppo

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fabiogaluppo
fabiogaluppo / gist:66d0563227c9bcb9915233ee438b31c3
Last active July 20, 2018 01:08
Built-in Types in Python (Elementary Data Structures)
# http://bit.ly/py-eds-1
import hashlib
"""
>>> cut ("HelloWorld", 5)
('Hello', 'World')
"""
def cut(msg, cut_point):
return (msg[:cut_point], msg[cut_point:])