The main purpose of this paper is to prove difference and q-difference counterparts of the Clunie lemma from the Nevanlinna theory of differential polynomials, where the difference and q-difference polynomials can contain many terms of maximal total degree in f(z) and its ( q-)shifts.