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.

9th Mar 2019, 6:05 PM
vicky
11 Antworten
0
~ swim ~ it still does not work
9th Mar 2019, 6:58 PM
vicky
0
~ swim ~ i know what you mean but it does not work
9th Mar 2019, 8:17 PM
vicky
0
~ swim ~ it is giving “None” as output
9th Mar 2019, 9:16 PM
vicky
0
~ swim ~ now I got error
9th Mar 2019, 10:36 PM
vicky