May-01-2023, 08:36 PM
If this is a training course question, maybe you should just do what the question actually asks?
Enumerate through your list.
Check if current iteration is a string and if so, delete it.
Return (or print) the list that's now devoid of strings.
This should be simple and only require basic Python. You don't need type-checking tools, list comprehensions or Numpy(!? ?!)
Once you can do that, preferably on you own, take a look at some of the other answers posted for alternative methods.
Enumerate through your list.
Check if current iteration is a string and if so, delete it.
Return (or print) the list that's now devoid of strings.
This should be simple and only require basic Python. You don't need type-checking tools, list comprehensions or Numpy(!? ?!)
Once you can do that, preferably on you own, take a look at some of the other answers posted for alternative methods.
"So, brave knights, if you do doubt your courage or your strength, come no further, for death awaits you all with nasty, big, pointy teeth!" - Tim the Enchanter