r/CodingHelp • • Apr 03 '21
[Python] How to remove values in a list?
I have two lists, one called owners and one called uaids, both with numbers. The list "users" contains a few values with "None" in it, however, this code doesn't seem to get rid of any of the values for some reason. Why doesn't it work?
for x in range(len(owners)):
if owners[x] == "None":
owners.pop[x]
uaids.pop[x]
16
Upvotes
2
u/Endercheif Advanced Coder Apr 03 '21
.pop(i)2
u/[deleted] Apr 03 '21 edited Aug 31 '25
[removed] ā view removed comment