Multiple For Loop In Python Using Pipe