Python Forum
How to use Del with list
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use Del with list
#6
Use python tags when posting code. See the BBCode link in my signature below for instructions. We can't see the indentation without the tags. And I really want to see the indentation, because I have no idea why you have a for loop in there. And if you are getting an error, post the full text of the error.

My guess is the second deletion doesn't work because the first deletion changes the length of the list. Which is why we keep telling you to use -1 for the index of the last item of the list.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
How to use Del with list - by slashdotblake - Sep-19-2018, 11:42 PM
RE: How to use Del with list - by Larz60+ - Sep-19-2018, 11:47 PM
RE: How to use Del with list - by slashdotblake - Sep-20-2018, 12:18 AM
RE: How to use Del with list - by ichabod801 - Sep-20-2018, 01:47 AM
RE: How to use Del with list - by slashdotblake - Sep-20-2018, 02:51 AM
RE: How to use Del with list - by ichabod801 - Sep-20-2018, 03:31 AM
RE: How to use Del with list - by slashdotblake - Sep-20-2018, 06:08 AM
RE: How to use Del with list - by Larz60+ - Sep-20-2018, 08:24 AM
RE: How to use Del with list - by slashdotblake - Sep-20-2018, 08:43 PM
RE: How to use Del with list - by ichabod801 - Sep-20-2018, 02:11 PM
RE: How to use Del with list - by Larz60+ - Sep-21-2018, 12:17 AM
RE: How to use Del with list - by slashdotblake - Sep-21-2018, 05:38 PM
RE: How to use Del with list - by gruntfutuk - Sep-21-2018, 01:08 PM
RE: How to use Del with list - by Larz60+ - Sep-21-2018, 10:11 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020