Re: Can Anyone Help me on this

2005-11-03 Thread [EMAIL PROTECTED]
Thx Alex. -- * Posted with NewsLeecher v3.0 Beta 7 * http://www.newsleecher.com/?usenet -- http://mail.python.org/mailman/listinfo/python-list

Re: Can Anyone Help me on this

2005-11-03 Thread Alex Martelli
[EMAIL PROTECTED] wrote: > Thanks Guys, Wow, i didnt knew that there was alist reverse function. > thx. also. i need a good documentation of the os and sys modules as > well as builtin functions of python. > > the standard python documentation doesnt work for me. can u recommend > something? I

Re: Can Anyone Help me on this

2005-11-03 Thread [EMAIL PROTECTED]
Thanks Guys, Wow, i didnt knew that there was alist reverse function. thx. also. i need a good documentation of the os and sys modules as well as builtin functions of python. the standard python documentation doesnt work for me. can u recommend something? -- * Posted with NewsLeecher v3.0 Beta

Re: Can Anyone Help me on this

2005-11-03 Thread Peter Hansen
[EMAIL PROTECTED] wrote: > i m trying to reverse the order in which the > strings are stored in list > > then pop it into another list > > what m i doin worng?? > > here's the code: > > list1 = [] > list2 = [] > list1.extend('123456789') How about this instead (Python 2.4 or later): list2 = l

Re: Can Anyone Help me on this

2005-11-03 Thread jmdeschamps
... list2=list1[:] ... Yes, naturally, where was my head ?-)) -- http://mail.python.org/mailman/listinfo/python-list

Re: Can Anyone Help me on this

2005-11-03 Thread Mike Meyer
[EMAIL PROTECTED] writes: > If what you want is a reversed copy, you could just append list1 > elements to list2, and use the reverse function such as ... for i in list1: > ... list2.append(i) > ... Don't do this by ahnd - let python do it for you: list2 = list(list1) or list2 = lis

Re: Can Anyone Help me on this

2005-11-03 Thread David Wahler
[EMAIL PROTECTED] wrote: > If what you want is a reversed copy, you could just append list1 > elements to list2, and use the reverse function such as > >>> ... > >>> for i in list1: > ... list2.append(i) > ... > >>> list2.reverse() > >>> list1 > ['1', '2', '3', '4', '5', '6', '7', '8', '9'] > >>>

Re: Can Anyone Help me on this

2005-11-03 Thread Cyril Bazin
Here is an example of copying then reversing a list: >>> l1 = [1,2,"C"] >>> l2 = l1[:] >>> l2.reverse() >>> l2 ['C', 2, 1] -- http://mail.python.org/mailman/listinfo/python-list

Re: Can Anyone Help me on this

2005-11-03 Thread jmdeschamps
[EMAIL PROTECTED] wrote: > i m trying to reverse the order in which the > strings are stored in list > > then pop it into another list > > what m i doin worng?? > > here's the code: > > list1 = [] > list2 = [] > list1.extend('123456789') > > print list1 > > for a in list1: > list2 = list1.pop(

Can Anyone Help me on this

2005-11-03 Thread [EMAIL PROTECTED]
i m trying to reverse the order in which the strings are stored in list then pop it into another list what m i doin worng?? here's the code: list1 = [] list2 = [] list1.extend('123456789') print list1 for a in list1: list2 = list1.pop() print list2 -- * Posted with NewsLeecher v3.0 Bet