Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- import random
- final = []
- filename = input("Inserisci il nome del file: ")
- filename = filename + '.txt'
- with open(filename, "r") as f1:
- for line in f1:
- almost = re.sub("DOWNLOAD[.]*", "", line)
- final.append(almost)
- file_name = "openload" + str(random.randint(0, 10000)) + ".txt"
- with open(file_name, "w") as f2:
- for element in final:
- print(element, file = f2)
Add Comment
Please, Sign In to add comment