Dynamic Printing not Working

This is what my code is

this is what is printing…

image

For some reason, dynamic loop printing is not working and will not stay on the same line. I’m not sure what I’m doing wrong.

The code is correct and the printing on the terminal is also fine as per the code. I am not sure what you mean by dynamic printing in this case? The print statement will be executed every time the loop runs.

I found the solution for this.

print("\r[+] Packets sent: " + str(sent_packets_count), end="")