[noob ques] python help
Go to solution
Solved by fizzlesticks,
guys i need help here it says index error but i think index of the list is just fine !
def original_lst(L): lst = [1,2,2,3,4,9,9] count = 0 i = len(lst) m = len(lst)-1 while i > 0: if lst[i] == lst[m]: del lst[i] i -= 1 m -= 1
The maximum index of a list is the length - 1.

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now