python/pin.py: initial commit

This commit is contained in:
Aminda Suomalainen 2022-03-18 17:59:07 +02:00
parent 5d41a732e1
commit cbdb39e07d
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q

15
python/pin.py Executable file
View File

@ -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()