Skip to content

Instantly share code, notes, and snippets.

@stephengruppetta
Created May 7, 2023 09:48
Show Gist options
  • Save stephengruppetta/8cb5996cceac2bdc01c26e0af8590513 to your computer and use it in GitHub Desktop.
Save stephengruppetta/8cb5996cceac2bdc01c26e0af8590513 to your computer and use it in GitHub Desktop.
import functools
import random
bizarre_print = functools.partial(
print,
"Here is a random number",
random.randint(0, 100),
sep=" • | • ",
end=" <THE END>\n",
)
print(bizarre_print.args)
# ('Here is a random number', 42)
print(bizarre_print.keywords)
# {'sep': ' • | • ', 'end': ' <THE END>\n'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment