In [16]: p
Out[16]: (4, 4, 4)

In [17]: q
Out[17]: (2, 2, 2)

In [18]: r
Out[18]: (8, 8, 8)

In [19]: for i in range(len(p)):
    if( (p[i] > q[i]) & p[i] < r[i]):
        print "True"
   ....:
True
True
True


On Wed, Jun 24, 2015 at 10:07 AM, Great Avenger Singh <[email protected]>
wrote:

> Hello Everyone,
>
>  I am writing a code Where I need to specify a condition of Tuple Range.
> Is Defining tuple range is possible in Python ?
>
> it something like:
>
> p = (4,4,4)
>
> q = (2,2,2)
>
> r = (8,8,8)
>
> for p in range(q - r)     # need Help with this part....
>
>     print "True"
>
>
> How Can I create range for two tuples, Please let me know If I am able
> to clarify myself.
>
> --
>
> Thanks
> Arshpreet Singh
>
> I am Sikh boy, Learning by doing and Learning by teaching is my religion.
>
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds.  Stuff that matters.
> http://tv.slashdot.org/
>
> --
> --
> Mailing list guidelines and other related articles:
> http://lug-iitd.org/Footer
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Linux User Group @ IIT Delhi" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
Mailing list guidelines and other related articles: http://lug-iitd.org/Footer

--- 
You received this message because you are subscribed to the Google Groups 
"Linux User Group @ IIT Delhi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to