scripts/python/pin.py

16 lines
304 B
Python
Raw Normal View History

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