Re: To check if number is in range(x,y)

2020-12-14 Thread Tim Chase
On 2020-12-14 21:21, Schachner, Joseph wrote: > >>> r = range(10) > So r is a list containing 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 In Python 3.x, r is *not* a list. It is a custom object/class. > >>> 2 in r > True > As expected. I'm not sure what your replies are suggesting here. I demonstrate

Re: To check if number is in range(x,y)

2020-12-14 Thread Dan Stromberg
On Mon, Dec 14, 2020 at 3:07 PM Dan Stromberg wrote: > > On Mon, Dec 14, 2020 at 1:23 PM Schachner, Joseph < > joseph.schach...@teledyne.com> wrote: > >> >>> r = range(10) >> So r is a list containing 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 >> > To get a list of consecutive int's, you can use, for EG: > r =

Re: To check if number is in range(x,y)

2020-12-14 Thread Dan Stromberg
On Mon, Dec 14, 2020 at 1:23 PM Schachner, Joseph < joseph.schach...@teledyne.com> wrote: > >>> r = range(10) > So r is a list containing 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 > To get a list of consecutive int's, you can use, for EG: r = list(range(10)) -- https://mail.python.org/mailman/listinfo/python-

Re: To check if number is in range(x,y)

2020-12-14 Thread 2QdxY4RzWzUUiLuE
On 2020-12-14 at 21:21:43 +, "Schachner, Joseph" wrote: > >>> r = range(10) > So r is a list containing 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 In a number of ways, r behaves as if it were that list, but r is definitely not that list: >>> r = range(10) >>> type(r) >>> l = [0, 1, 2, 3,

RE: To check if number is in range(x,y)

2020-12-14 Thread Schachner, Joseph
>>> r = range(10) So r is a list containing 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 >>> 2 in r True As expected. >>> 2.5 in r False Also as expected. If you did int(floor(2.5)) in 5 that would be true. >>> r = range(1, 10, 2) >>> 2 in r False >>> list(r) [1, 3, 5, 7, 9] Well, yes, becaus

Re: Planet Python

2020-12-14 Thread dn via Python-list
On 12/12/2020 07:22, dn via Python-list wrote: Has something happened to the Planet Python feed? - Last update: December 07, 2020 04:48 PM UTC Fixed! (Thanks!) Although, still reported as an 'open' issue https://github.com/python/planet/issues/446 -- Regards =dn -- https://mail.python.org/mai