Heads Up :
The post you are writing will appear in a public forum. Please ensure all content is appropriate for public consumption. Review the employee guidelines for the community here.
Hi,Instead of parsing the running-config (which means additional execution time for your script until the running-config is collected), why not getting the hostname directly using 'show hostname' command? print(net_connect.send_command('show hostname...