Let's say I have a filename (test.txt) with the following data in it:
AA11 BB11 CC11 DD11
AA22 BB22 CC22 DD22
AA33 BB44 CC44 DD33
in bash (shell scripting) I can do the following:
cat test.txt | while read a b c d
do
echo "this is the first column $a "
echo "this is the second column $b "
echo "this is the third column $c "
echo "this is the fifth column $d "
done
How can I do the same with python? how can I store the value of each column in a variable and then read the file line by line while storing and manipulating their value?