Mar-04-2019, 04:12 PM
def factors(x): L = [] for i in range(1, x + 1): if x % i == 0: L.append(i) return L num = 84 print (factors(num))I'm trying to return a list in this function. Python gives me an error "IndentationError: unindent does not match any outer indentation level"
Could someone help me fix it? Many thanks in advance!