Skip to content
Advertisement

How to modify the parsing of my Python script

Edit: sample code https://replit.com/@JustinEzequiel/CoralFrighteningSign thanks to JustinEzequiel

This is my current code.

JavaScript

It outputs something like this

JavaScript

(if D32489DJ) was the host name.

I want to make it output something like

JavaScript

How can I modify my code to make this possible?

Snippet of file path

all you have to do is drag the file into your terminal after you run the program, make a new txt file named whatever you want.

put this exactly as it is line by line

JavaScript

that’s what it looks like in my file, just random host names that don’t make any sense separated line by line.

Advertisement

Answer

You forgot to string the n (linebreaks) at the end of each line.

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement