can we append a list with another list in Python ?
inshu chauhan
insideshoes at gmail.com
Thu Oct 25 05:51:01 EDT 2012
More information about the Python-list mailing list
Thu Oct 25 05:51:01 EDT 2012
- Previous message (by thread): can we append a list with another list in Python ?
- Next message (by thread): can we append a list with another list in Python ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> Is this what you mean: > > >>> list_1 = [i for i in range(0,5)] > >>> list_2 = [i for i in range(5,11)] > >>> for i in list_2: > ... list_1.append(i) > ... > >>> list_1 > [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] > > > or would another example help you out more? > No but really sorry this is what I DONT WANT....... The output I want to have is : [ [0, 1, 2, 3, 4 ], [5, 6, 7, 8, 9, 10] ]..... > > -- > Best Regards, > David Hutto > CEO: http://www.hitwebdevelopment.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-list/attachments/20121025/da2955a0/attachment.html>
- Previous message (by thread): can we append a list with another list in Python ?
- Next message (by thread): can we append a list with another list in Python ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list