[Tutor] Identify whether a character is unicode control.

Alexandro Gon San AlexandroGonSan at outlook.com
Wed Sep 16 18:49:33 EDT 2020


My code:

import random
def char_is_control(char):
    #TODO
    None
string = ''
while len(string)<100000:
    number = random.randint(0,(256**4)-1)
    char = (number).to_bytes(4,byteorder='big').decode("utf_8",'ignore')
    if not char_is_control(char):
        string += char

I need to implement the char_is_control function .

I thank you very much.




More information about the Tutor mailing list