def generate_28_digit_numbers():
# Ask the user for the first 24 digits
base_number = input("Enter the first 24 digits: ")
# Check if the input is 24 digits long and numeric
while len(base_number) != 24 or not base_number.isdigit():
print("The input must be exactly 24 digits.")
base_number = input("Enter the first 24 digits: ")
# Ask the user for the filename
file_name = input("Enter the file name (without extension): ") + ".txt"
# Open the file in write mode
with open(file_name, 'w') as file:
# Loop through 0000 to 9999
for i in range(10000):
# Create a 4-digit number with leading zeros if necessary
suffix = f"{i:04d}"
# Concatenate the 24-digit base with the 4-digit suffix
full_number = base_number + suffix
# Write the 28-digit number to the file followed by a comma and space
file.write(full_number + ", ")
print(f"File '{file_name}' has been created with 10,000 28-digit numbers.")
# Run the function
generate_28_digit_numbers()