Wrapping around a list in Python.

2013-12-15 Thread shengjie . shengjie
Hi guys, I am trying to create a fixed list which would allow my values to be wrapped around it. For example i have 10 values : 0,1,2,3,4,5,6,7,8,9 I need to create a list which contains 4 numbers and when the number exceeds the list, it would overwrite the first value. [0,1,2,3] [4,1,2,3]

Re: Wrapping around a list in Python.

2013-12-15 Thread shengjie . shengjie
On Monday, 16 December 2013 12:59:32 UTC+8, Ben Finney wrote: shengjie.sheng...@live.com writes: Hi guys, I am trying to create a fixed list which would allow my values to be wrapped around it. This doesn't make a lot of sense to me, but I assume you have a purpose in mind

Re: Wrapping around a list in Python.

2013-12-15 Thread shengjie . shengjie
On Monday, 16 December 2013 13:07:46 UTC+8, shengjie...@live.com wrote: On Monday, 16 December 2013 12:59:32 UTC+8, Ben Finney wrote: shengjie.sheng...@live.com writes: Hi guys, I am trying to create a fixed list which would allow my values to be wrapped around

Re: Wrapping around a list in Python.

2013-12-15 Thread shengjie . shengjie
On Monday, 16 December 2013 13:10:22 UTC+8, Gary Herron wrote: On 12/15/2013 08:38 PM, shengjie.sheng...@live.com wrote: Hi guys, I am trying to create a fixed list which would allow my values to be wrapped around it. For example i have 10 values : 0,1,2,3,4,5,6,7,8,9 I need to

Re: Wrapping around a list in Python.

2013-12-15 Thread shengjie . shengjie
On Monday, 16 December 2013 12:38:14 UTC+8, shengjie...@live.com wrote: Hi guys, I am trying to create a fixed list which would allow my values to be wrapped around it. For example i have 10 values : 0,1,2,3,4,5,6,7,8,9 I need to create a list which contains 4 numbers and when the number