I am using telnetlib to print the output after the last command i write to server
tn.write(cmd_login)
tn.write(cmd...)
tn.write(cmd_last)
print tn.expect([word],timeout)[-1]
however, when I printed the return of expectation , it also show the result I wrote to server before(eg:cmd_login cmd...) Is there anyway to only print the result after the tn.write(cmd_last) ?