<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">Creating a set:\\
{\ex \lstinline|   p10 = set([2, 3, 5, 7]) |t}

Creating set from a tuple or list:\\
{\ex \lstinline|   s = set(var_name)|}

Operations on sets. Ex: UNION:\\
{\ex \lstinline|   s1 \| s2 |}

Other operations available:\\

\begin{lstlising}
\item "\&amp;" -- Intersection
\item "-" -- Difference
\item "\^" -- Symmetric Difference
\item "&lt;" -- Subset
\end{lstlisting}

Checking for containership:\\
{\ex \lstinline|    x in p10|}

Finding the no.of elements:\\
{\ex \lstinline|    len(p10)|}
</pre></body></html>