From cbdb39e07d948f55d7e111aa96f88abed23d891a Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Fri, 18 Mar 2022 17:59:07 +0200 Subject: [PATCH] python/pin.py: initial commit --- python/pin.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 python/pin.py diff --git a/python/pin.py b/python/pin.py new file mode 100755 index 0000000..4c02ad3 --- /dev/null +++ b/python/pin.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python +import sys +import secrets + +try: + wantedCount = int(sys.argv[1]) +except IndexError as noarg: + print("Enter a digit as an argument!") + +try: + for i in range(int(wantedCount)): + print(secrets.randbelow(10),end="") +except NameError as noWantedCount: + print() +print()