Skip to content

Instantly share code, notes, and snippets.

@harshildarji
Created April 20, 2020 11:38
Show Gist options
  • Save harshildarji/71b915b567cb7bd9a9594840425d6c92 to your computer and use it in GitHub Desktop.
Save harshildarji/71b915b567cb7bd9a9594840425d6c92 to your computer and use it in GitHub Desktop.
Generate Random Number
import random, time
def generate_random_number():
number = list(map(str, str(time.time()).replace('.', '')))
return int(''.join(random.sample(number, len(number))))
print(generate_random_number())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment