Using Python to remove blank lines and comments in Assembly code
I have a few recommendations for your code.

First I noticed that you do not close neither the input nor the output file. This can lead to issues if you or someone else wants to access the files after your script was run. Adding a simple ''finput.close()'' and analogous for the foutput would basically "fix" the issue. However it is considered best practice to use a context manager for accessing resources like files. A context manager is able to open the file for you and close it if you leave the context no matter if you leave it by intent or because of an exception. Using a context manager could look like the following:

with open(input_path) as finput:
    for line in finput:
        print(line)


Another point is how you strip off line endings and what you store in the variables. You say you want to get rid of all comments but nonetheless you are storing them in a variable as well as I would use the strip command before the check if you need to add a new line char. The strip will also remove new line chars and therefore convert empty lines to empty strings one can easily test for. All in all I would write it the following way:

new_line = line.split("//")[0].replace(" ","").rstrip()
if new_line:
    foutput.write(new_line + "\n")


I hope that helps even though I did not add links to the mentioned methods and best practices.