scripts/python/pin.py

16 lines
304 B
Python
Raw Normal View History

2022-03-18 16:59:07 +01:00
#!/usr/bin/env python
import sys
import secrets
try:
2023-04-06 11:03:10 +02:00
wantedCount = int(sys.argv[1])
2022-03-18 16:59:07 +01:00
except IndexError as noarg:
2023-04-06 11:03:10 +02:00
print("Enter a digit as an argument!")
2022-03-18 16:59:07 +01:00
try:
2023-04-06 11:03:10 +02:00
for i in range(int(wantedCount)):
2023-05-18 09:06:16 +02:00
print(secrets.randbelow(10), end="")
2022-03-18 16:59:07 +01:00
except NameError as noWantedCount:
print()
print()