Skip to main content
Commonmark migration
Source Link

#Python 2, 178 bytes

Python 2, 178 bytes

import glob,os,random
try:os.startfile(random.choice([y for x in os.walk(os.getenv('HOMEPATH'))for y in glob.glob(os.path.join(x[0],'*.mp3'))]))
except:print"Sorry Joe, no Jams!"

Works on Windows, as per the spec.

#Python 2, 178 bytes

import glob,os,random
try:os.startfile(random.choice([y for x in os.walk(os.getenv('HOMEPATH'))for y in glob.glob(os.path.join(x[0],'*.mp3'))]))
except:print"Sorry Joe, no Jams!"

Works on Windows, as per the spec.

Python 2, 178 bytes

import glob,os,random
try:os.startfile(random.choice([y for x in os.walk(os.getenv('HOMEPATH'))for y in glob.glob(os.path.join(x[0],'*.mp3'))]))
except:print"Sorry Joe, no Jams!"

Works on Windows, as per the spec.

Source Link

#Python 2, 178 bytes

import glob,os,random
try:os.startfile(random.choice([y for x in os.walk(os.getenv('HOMEPATH'))for y in glob.glob(os.path.join(x[0],'*.mp3'))]))
except:print"Sorry Joe, no Jams!"

Works on Windows, as per the spec.