I know that this question has been asked before but after a long search I've couldnt find any solution that helps me. currently, I'm trying to open a file given by a user, read the file content and print each line in the same line overwriting the line.
Expected result:
Trying: xxx --> replace the xxx and write trying: yyy in the same position.
when tyring to implement this option I could get it with numbers but not with strings. this is my code example:
wordlist = input("Enter wordlist path")
with open(wordlist, 'r', encoding='utf-8') as wl:
for line in wl:
r = requests.get(url + '/' + line)
sys.stdout.write('trying: %s' % line)
sys.stdout.flush()
time.sleep(0.3)