[Tutor] Sets question

Phil phil_lor at bigpond.com
Wed Apr 26 20:33:16 EDT 2017


Another question I'm afraid.

If I want to remove 1 from a set then this is the answer:

set([1,2,3]) - set([1])

I had this method working perfectly until I made a change to cure another bug.

So, I have a set represented in the debugger as {1,2,3} and again I want to remove the one. Only this time the one set is represented as {'1'} and, of course {'1'} is not in the set {1,2,3}.

Ideally, I would like {'1'} to become {1}. Try as I may, I have not discovered how to remove the '' marks. How do I achieve that?

-- 
Regards,
Phil


More information about the Tutor mailing list