vue2 data hijacking principle

2023-01-15   ES  

# Generate 13 random code as the new file name 
 Import String 
 Import Random 

 def newName_creator (Digit): 
     newName = '' 
     for word in range (DIGIT): 
         newName + = RANDOM.CHOICE (String.ascii_UPPERCASE + String.digits) 
     Return newName 
 def all_newname (): 
     data = '' 
     Count = 0 
     for count in range (358): 
         digit = 13 
         data+= newName_creator (DIGIT)+'. JPG'+'\ N' 
     Return data 

 f = Open ('Newname.txt', 'W') 
 f.write (all_newname ()) 
 f.close () 
 #量
newnames=open('newname.txt','r+')
newnames=list(newnames)
file_names=os.listdir('E:/wallpaper')
index=0
for index in range(358):
    os.rename('E:/wallpaper/'+file_names[index],'E:/wallpaper/'+newnames[index].strip('\n'))

source

Related Posts

linux configuration ffmpeg

Detailed explanation list list in Python

python+pycharm and Visualstudio C ++ community version uses PK and confusing grammar problems

Standard Korean pronunciation entry -vowels and consonants

vue2 data hijacking principle

Random Posts

nodejs knowledge point

java implements Chinese numbers and Arabic numerals to each other

ES command summary

CHROME Performance Analysis Panel Performance

Suning “sells unable to sell”