1import random, os
2path = r"C:\Users\G\Desktop\scientific-programming-2014-master\scientific-programming-2014-master\homework\assignment_3\cifar-10-python\cifar-10-batches-py"
3random_filename = random.choice([
4 x for x in os.listdir(path)
5 if os.path.isfile(os.path.join(path, x))
6])
7print(random_filename)