two files into an alternate list
J. Clifford Dyer
jcd at sdf.lonestar.org
Mon Oct 29 13:29:41 EDT 2007
That depends:
What do you want when you have these two files:
file 1:
a
b
c
file 2:
1
2
3
4
5
Options:
*['a',1,'b',2,'c',3,None,4,None,5]
*['a',1,'b',2,'c',3,4,5]
*['a',1,'b',2,'c',3]
*Throw an exception
And what if file 1 has more lines than file 2?
Cheers,
Cliff
1
On Mon, Oct 29, 2007 at 09:50:51PM +0530, Beema shafreen wrote regarding two files into an alternate list:
> Delivered-To: python-list at bag.python.org
> Date: Mon, 29 Oct 2007 21:50:51 +0530
> From: "Beema shafreen" <beema.shafreen at gmail.com>
> To: python-list at python.org
> Subject: two files into an alternate list
> Precedence: list
> List-Id: General discussion list for the Python programming language
> <python-list.python.org>
> List-Unsubscribe: <http://mail.python.org/mailman/listinfo/python-list>,
> <mailto:python-list-request at python.org?subject=unsubscribe>
> List-Archive: <http://mail.python.org/pipermail/python-list>
> List-Post: <mailto:python-list at python.org>
> List-Help: <mailto:python-list-request at python.org?subject=help>
> List-Subscribe: <http://mail.python.org/mailman/listinfo/python-list>,
> <mailto:python-list-request at python.org?subject=subscribe>
> Errors-To: python-list-bounces+jcd=sdf.lonestar.org at python.org
>
> hi everybody ,
> i have a file :
> file 1:
> 1
> 2
> 3
> 4
> 5
> 6
> file2:
> a
> b
> c
> d
> e
> f
> how do i make the two files into list like this =
> [1,a,2,b,3,c,4,d,5,e,6,f]
> regards
> shafreen
> --
> http://mail.python.org/mailman/listinfo/python-list
More information about the Python-list
mailing list