Skip to main content
Rami Sedhom

Main navigation

  • Humanitarian
  • Software
  • About Me
  • Contact Me

Python Snippets

By rami.sedhom, 22 March, 2022
  1. Random integer between 1 and 100:
    import random;
    print(random.randint(1,100))
  2. Random file from directory1:
    import os,random;
    print(random.choice(os.listdir('D:\\Downloads')));
  • Python
  • Snippet
  • Software
  • 🌱 Seedlings