random pick any file from directory python

37

random pick any file from directory python -

import os, random
random.choice(os.listdir("C:\\")) #change dir name to whatever

Comments

Submit
0 Comments