I wish did fix the issue. One or the other may be more efficient depending on the implementation. With proper optimization flag, decent compiler should be able to change less efficient form into another (assuming printf("%s\n", message)) without programmer's knowledge.
help you fix your problem The issue is probably that you need to send a \n at the end of your data string so the telnet server knows you have sent a full sequence of data. Otherwise it is most likely sitting there waiting for more input. Try:
What is an efficient way to test a string for a specific datetime format like "m%/d%/Y%" in python 3.6?
By : leehomking
Date : March 29 2020, 07:55 AM
will be helpful for those in need I went with the advice of @ChristianDean and used the try-except block in effort to be Pythonic. The first format %m/%d/%Y appears a bit more in my data, so I lead the try-except with that datetime formatting attempt. Here is my final solution: