From 60858de021129c7ebdc54f25044624ff8a7a017d Mon Sep 17 00:00:00 2001 From: Intel A80486DX2-66 Date: Sun, 5 May 2024 10:05:02 +0300 Subject: [PATCH] generate_C_lang_token.py: do TODO 1 --- python-programming/generate_C_lang_token.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/python-programming/generate_C_lang_token.py b/python-programming/generate_C_lang_token.py index 8c8f612..ba011ad 100644 --- a/python-programming/generate_C_lang_token.py +++ b/python-programming/generate_C_lang_token.py @@ -4,16 +4,13 @@ # # Author: Intel A80486DX2-66 # License: Unlicense -# -# TODO: If the generated token starts with `__`, replace the first 2 characters -# to a random [A-Za-z]{2,2} string from random import choice from string import ascii_lowercase, ascii_uppercase, digits from sys import argv, stdin -first_char_alphabet = ascii_uppercase + ascii_lowercase + "_" -alphabet = first_char_alphabet + digits +first_char_alphabet = ascii_uppercase + ascii_lowercase +alphabet = first_char_alphabet + digits + "_" random_token = lambda n: \ "".join( \