- Random integer between 1 and 100:
import random; print(random.randint(1,100))
- Random file from directory1:
import os,random; print(random.choice(os.listdir('D:\\Downloads')));
import random;
print(random.randint(1,100))
import os,random;
print(random.choice(os.listdir('D:\\Downloads')));