Is there a way to add multiple conditions in a for loop?
Question: 
        n=int(raw_input('enter the number of mcnuggets you want to buy : ')) #total number of               mcnuggets you want yo buy
        for a in range(1,n) and b in range(1,n) and c in range(1,n) :
            if (6*a+9*b+20*c==n):
                print 'number of packs of 6 are ',a
                print 'number of packs of 9 are ',b
                print 'number of packs of 20 are',c
    

i am new to programming and i am learning python.the code above gives errors.
Any suggestion.?.


Answer: You should use nested loops:

    
    
    for a in range(1, n):
        for b in range(1, n):
            for c in range(1, n):
                if ...
    

Or even better:

    
    
    import itertools
    
    for a, b, c in itertools.product(range(1, n + 1), repeat=3):
        if ...
    

