0
Multiples in list
I try to make a code. You have to input a list. And remove al the multiples of n (also input) and give that list as output. I tried: L = input(list(“give a list”)) N = int(input(“give a number”)) Def remove_multiples(L, N): for i in l: if i%N == 0: L.remove(i) print(remove_multiples(l, n)) I can’t find what i’m doing wrong.
11 Antworten