Skip to content
Advertisement

How to unlist given list in python?

I have to copy particular columns from a given file to another file. but while copying that columns to another file i don’t need them in list format. How can i do that?

eg suppose file is abc.txt.gz

JavaScript

From this data i needed to copy 3rd and 4th column and move to another file.

Expected output: data.txt

In expected output I only need data & new. I don’t want nothing else to get copied to my new file. Example:

JavaScript

This is my current attempt:

JavaScript

Current output:

JavaScript

Advertisement

Answer

You can do something like this:

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