CHR () returns the current value of the ASCII character corresponding to an integer.

#chr () with a range (i.e., 0 ~ 255) as a parameter to an integer within a range (256), and returns a corresponding character. 
# Return value is an integer corresponding to the current ASCII characters.
. 1
Import Random 2 input_m = 10 . 3 my_list = [] . 4 for I in Range (input_m): . 5 NUM = the random.randint (65, 90, ) . 6 my_list.append (CHR (NUM)) . 7 Print (my_list)

 

Guess you like

Origin www.cnblogs.com/zyqomj/p/11083636.html