2 ms·
Also, 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
by schoen 8y ago
Also, 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!