Last active
August 29, 2015 14:06
-
-
Save jleeothon/c97caccfc2214c37cc5e to your computer and use it in GitHub Desktop.
This is a module I run when I want to do probability homework
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import locale | |
from math import factorial as f | |
locale.setlocale(locale.LC_ALL, 'en') | |
nice = lambda: locale.format("%d", _, grouping=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This magic only works in the console for the special variable
_
.After doing whatever operations, type
nice()
and the last result will be printed in a nicer, more readable way.