“Iteration” of sets

lol so I have

len(x{i}) >= len(x-{i})

rip it up

Update: len( x ) >= len( x - {i} )
Having a hard thing me putting i after first x is it a list? A dictionary?

Hi Jack,

there are dozens of tutorials for python sets out there, alike:

I would like to propose to work through one and then come back.

Cheers, Dominik

Well what I’m trying to do is weed out copy cats of the equasion in my program…

Tom Riddle, is it you? :joy:

Cheers, Dominik

what? Yes I’m the writer of this program. No I’m not evil at all.

Prove everything.
Nothing outweighs anything already

I learned to use -1 for the last value of a list

It’s time for a new post

I’m sorry, I can’t work out what your code is supposed to be doing. I
wish you would explain your requirements in words rather than cryptic
comments and complex code that may not do what you want it to do.

But you end your post with this question:

“How do I reference the last bit of the list I created?”

You can retrieve the last item in a list two ways:

L = [10, 20, 30, 40, 50, 60]

# get the last item
value = L[len(L) - 1]

# shortcut
value = L[-1]

A couple of more comments about your code.

You have: p = [set(), set(set())]

That is better written as p = [set(), set()] as the set of a set is
just a copy of the inner set.

You also have this test: if add_set_count == float('inf'). That will
never be true, so it does nothing and you can remove it.

Your loop has

for add_set_count in range(len(ever_p))

but at the time it starts, ever_p will only every have a single item,
so the body of the loop will only ever run once, no matter how you
modify the list ever_p inside the loop.

Use -1 got it

Thanks Steven