Hi everyone,<br><br>I am new to Python. Been poking at it for about a month now. I am trying to set up a list for information on people.<br>For example:<br>person 0's name = "Sam". li[0][0]<br>person 0's hoppy = "skateboarding" li[0][1]<br>
person 0's favorite color = ["green", "red"] li[0][2] # it appears i can put another list inside of the list, ie li[0][2]=[x,y,z] very cool! we couldn't do that in my grandpa languages. Would that be done with a li[0].append(['green','red']) after I'm done defining li[0][1]?? Then, I could just do a li[0][2].extend(['purple','mauve']) if more colors were ever needed?<br>
person 0's favorite numbers = [1, 3, 5-10, 78] li[0][3] # ranges of numbers? <br>person 1's name = "Mary" li[1][0]<br>etc..<br><br>My thought if there's not already an elegant solution in Python is to 
create a flag 'r' before ranges. So, the example here would become 
[1,3,'r',5,10,18,78]. Then I just do a  > < query to find a match.
 How does that sound?<br>newNum = 8<br>numHit = False<br>for i in range(len(li[x][3])):<br>   if li[x][3][i] == 'r':<br>      if li[x][3][i+1] < newNum > li[x][3][i+2]: # I didn't do <= and >= because the = parts will be evaluated in the next 2 iterations of the loop<br>
         numHit == True<br>      else:<br>         if newNum == li[x][3][i]:<br>            numHit == True<br>if numHit:<br>   print "You picked one of " + li[x][0] + "'s lucky numbers!"<br><br>How does that look? Is that ~ the best way to address my problem?<br>
<br>Thanks!<br>Michael<br>