scripts/python/pin.py

16 lines
303 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)):
print(secrets.randbelow(10),end="")
2022-03-18 16:59:07 +01:00
except NameError as noWantedCount:
print()
print()