Re: [Tutor] double ended queue

2017-11-05 Thread Atux Atux
Hi. Thanks a lot for the replies. i am actually nw to programming as well. your code keeps asking the user for a number and puts it to the end. how can i make it to add a number at the beginning if the user adds 01, then the program it will strip 0 and add 1 at ythe beginning, please? John On Su

Re: [Tutor] double ended queue

2017-11-05 Thread Steven D'Aprano
On Sun, Nov 05, 2017 at 10:07:31AM +0200, Atux Atux wrote: > Hi. Thanks a lot for the replies. i am actually nw to programming as well. > your code keeps asking the user for a number and puts it to the end. how > can i make it to add a number at the beginning if the user adds 01, then > the program

Re: [Tutor] double ended queue

2017-11-05 Thread Atux Atux
ok then. how do i link 'r' to remove an item from right with mylist.pop(0) and how can i remove an item from left with '0r'? On Sun, Nov 5, 2017 at 11:27 AM, Steven D'Aprano wrote: > On Sun, Nov 05, 2017 at 10:07:31AM +0200, Atux Atux wrote: > > Hi. Thanks a lot for the replies. i am actually nw

Re: [Tutor] double ended queue

2017-11-05 Thread Alan Gauld via Tutor
On 05/11/17 15:05, Atux Atux wrote: > ok then. how do i link 'r' to remove an item from right with mylist.pop(0) > and how can i remove an item from left with '0r'? Same way you detected the 'q' to quit. Using a variation of the 'code' I sent earlier: response = input().lower() # allow user s