![]() |
|
#1
|
|||
|
|||
You can create a for loop to iterate through the positions in your m_pos list. Each position is itself a list of X,Y values. For example, the following checks to see if a position is in the top right quadrant:
Code:
m_pos1=[0.3,0.3] m_pos2=[0.8,0.2] m_pos3=[0.8,0.8] m_pos = [m_pos1,m_pos2,m_pos3] for pos in m_pos: if pos[0] > 0.5 and pos[1] > 0.5: print pos,'is in the top right quadrant' |
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|