Skip to content

Instantly share code, notes, and snippets.

View cardoso243's full-sized avatar

Adenilson cardoso243

View GitHub Profile
@cardoso243
cardoso243 / callback.py
Created February 14, 2020 00:24 — forked from mchung/callback.py
Example of callbacks with Python
# Example of using callbacks with Python
#
# To run this code
# 1. Copy the content into a file called `callback.py`
# 2. Open Terminal and type: `python /path/to/callback.py`
# 3. Enter
def add(numbers, callback):
results = []
for i in numbers: