python disrupt the order of the list

Import Random
 # save the file is read to the list of words per line 
Lines = Open ( " Data / voc01.txt " , encoding = " UTF-. 8 " ) .read (). Split ( " \ n- " )
 # disrupted order of each row 
random.shuffle (lines)

 

Guess you like

Origin www.cnblogs.com/jumpkin1122/p/11516936.html