Hello guys, I am new on this forum, and new in python coding.I have a problem to solve, related to python classes.I am trying to:1- read a file with some columns2- select specific columns (ex. columns 1, 3 and 5)3- print those columns in a unique file, in a intercalary form.

You can use the csv module to make the reading of files easier.Alternatively, you can use str.split() to split your lines to lists.

After that, you just take the stuff you want and write it to a file however you want.If you're having trouble implementing this, feel free to post your code(do explain what your problem is, paste a traceback if you get it, and all that good stuff...)

Hello stranac, all I was abble to do is to import the file in read mode, and import the csv module.Now, is necessary to manipulate the file, semecting the columns I need, and then go to next step.Is this code correct for input the file I want?

That may be technically correct, however it is not recommended, like stranac explained. However sometimes I do the same in my prototype codes. Just make sure to use understandable variable names at some point. Otherwise you'll have pretty unmainainable code soon. Did you have any success on using the csv module yet?