3 ms·
This is inspired by this classic BASIC program, which is the inspiration for a whole book: https://10print.org/ https://10print.org/ (Note that this version o
by schoen 8y ago
This is inspired by this classic BASIC program, which is the inspiration for a whole book:
https://10print.org/ https://10print.org/
(Note that this version of the original is half the size of this Python adaptation!)
- schoen 8y agoAlso, I guess you didn't sign up for a code golf session, but this version is 11 bytes shorter: import random print(''.join(random.choice("/\\") for _ in "x"*9999)) I was surprised to discover that "import random\nrandom.choice", "import random as r\nrandom.choice", and "__import__("random").choice" are all exactly 27 bytes, so no byte count is saved by preferring any of these forms over another!