# 10 EJEMPLOS DE CREACION
#1
D=set()
print(D)
#2
d=set("PROFE")
print(d)
#3
DIC={1,2,3,4,5}
print(DIC)
#4
D={"hola"}
print(D)
#5
DC={"A","B","C","D"}
print(DC)
#6
DS=set("HOLA")
print(DS)
#7
Q={"GINO","BANCES"}
print(Q)
#8
A={"LIMA","FRUTA","CIUDAD","HERRAMIENTA"}
print(A)
#9
TUPLAS={"BIENVENIDO"}
print(TUPLAS)
#10
TUPL={1,2,3,4,5,"hola","sinpatica"}
print(TUPL)

# 10 EJEMPLOS DE PERTENENCIA
#1
D={1,2,3,4,5,6,7,8,9,10}
print( 2 in D)
#2
S={"EJEMPLOS","DE","TUPLAS"}
print("TUPLAS" in S)
#3
S=set("camino")
print("camino" in S)
#4
DC={"EL","ES","REY"}
print("REY" in DC)
#5
DA={1,5,10,15,20}
print(3 not in DA)
#6
G={"MANZANA","FRUTA","ARROZ","RICO","ACE","DETERGENTE"}
print("FRUTASA" in G)
#7
SA={6,7,8,9,}
print(6 in SA)
#8
B=set()
print(1 not in B)
#9
A={"TU","COSTILLA","TE","LA","REGALO","DIOS"}
print(2 in A)
#10
A={4,8,12,16,"doce"}
print(12 in A)

# 10 EJEMPLOS DE COMPARACION
#1
D={1,2,3,4}
D1={1,2,3,4}
print(D==D1)
#2
d={"hola","si","tu"}
d1={"hola","si","tu"}
print(d==d1)
#3
A=set("ABC")
B=set()
print(A>B)
#4
S={1,2,3,4,5,6}
Z={1,2,3,4}
print(S<Z)
#5
Q={"A","B","C"}
P={"A","B","C"}
print(P<Q)
#6
Z={10,11,12,13,14}
A={1,3}
print(Z>A)
#7
X={"A","E","I"}
Y={"uno","dos","tres","cuatro","cisnco"}
print(X<Y)
#8
A=set()
B=set()
print(A==B)
#9
P=set("AEIOU")
Q={"A","E"}
print(P>Q)
#10
A={1,10,2}
Z={1,2,3,4}
print(A>Z)

# 10 EJEMPLOS DE LONGUITUD
#1
A={"a","b","c"}
print(len(A))
#2
Z={0,20,2}
print(len(Z))
#3
A={"el","tu","yo","ella","nosotros"}
print(len(A))
#4
Q={"somos","tu","y","yo"}
print(len(Q))
#5
Q=set("ANGELA")
print(len(Q))
#6
X={1,2,3,4,5}
S=len(X)
print(S)
#7
Q={"A","E","I","O","U"}
print(len(Q))
#8
Z={"T","E","A","M","O"}
print(len(Z))
#9
Z1=set("programacion")
print(len(Z1))
#10
S={0,21,3}
print(len(S))

# 10 EJEMPLOS DE ITERACION
#1
Z={1,2,3,4,5}
for k in Z:
    print(k)
#2
Q={"JORGE","LUIS","ANGELA","SANSON","JUAN"}
for k in Q:
    print(k)
#3
A={1,3,5,7,9,11,13,15}
for k in A:
    print(k)
#4
Z={1,10,2,"uno","dos"}
for k in Z:
    print(k)
#5
D={"HOLA","MUNDO","BB","HHH","JJJ","LLLL"}
for k in D:
    print(k)
#6
A=set("AMOR")
for v in A:
    print(v)
#7
v=set("ALUMNOS")
for a in v:
    print(a)
#8
A={"planeta","tierra"}
for x in A:
    print(x)
#9
q =set("AVION")
for y in q:
    print(y)
#10
R={"QUE","ESTAS","HACIENDO"}
for i in R:
    print(i)

# 10 EJEMPLOS DE MAXMIN
#1
s={1,2,3,4,14,18}
print(max(s))
#2
n={10,100,10000}
print(max(n))
#3
nro={10,100,10,20.16}
print(max(nro))
#4
D={12,19,2,1,-8}
print(min(D))
#5
lista={"jose","ana"}
print(min(lista))
#6
biblia={"DIOS","TODOPODEROSO"}
print(max(biblia))
#7
t={1,10,5}
print(min(t))
#8
n={1,2,3,4,5,-1,-3,-6}
print(min(n))
#9
o={-2019,2019,-2020}
print(min(o))
#10
q={100,101,102,103,130}
print(max(q))

# 10 EJEMPLOS DE ELEMINACION:
#1
P={1,2,3,4,5}
P.discard(2)
print(P)
#2
Q={"A","a","E","e","I","i","O","o","U","u"}
Q.discard("A")
print(Q)
#3
b={1,2,3,4,5,6,7,8,9}
b.discard(9)
print(b)
#4
P={"dime","tu","nombre"}
P.discard("dime")
print(P)
#5
S={"HOLA",1,"MUNDO",2}
S.discard("HOLA")
print(S)
#6
P={"ERES","Y","POR","SIEMPRE","LO","SERAS"}
P.discard("SIEMPRE")
print(P)
#7
p1={1,"!"}
p1.discard("!")
print(p1)
#8
X=set("UNOS")
X.discard("N")
print(X)
#9
X={0,10}
X.discard(0)
print(X)
#10
Y={13,14,15,16,17,18,19,20}
Y.discard(20)
print(Y)

# 10 EJEMPLOS DE AGREGADO
#1
D=set("nombre")
s.add("gino")
print(s)
#2
A=set()
A.add(1)
print(A)
#3
A={1,2}
A.add("b")
print(A)
#4
S={10,"diez",20}
S.add("veinte")
print(S)
#5
W={"HOLA","MUNDO"}
W.add("besos")
print(W)
#6
SA={"ENE","FEB","MAR","ABR"}
SA.add("MAY")
print(SA)
#7
D={"i","o","u"}
D.add("a")
D.add("e")
print(D)
#8
X={1,2,3,4,5,6}
X.add(7)
print(X)
#9
SA=set("GIN")
SA.add("O")
print(SA)
#10
O={"BANCES"}
O.add("GINO")
print(O)

# 10 EJEMPLOS DE ANULACION
#1
A=set()
A.clear()
print(A)
#2
D={12,13,14}
D.clear()
print(D)
#3
D1={1,2,3,4,5}
D1.clear()
print(D1)
#4
A1={1,2,3,4,5}
A1.clear()
print(A1)
#5
SA={"tu","y","yo"}
SA.clear()
print(SA)
#6
Z={"lun","mar","mie","jue","vie"}
Z.clear()
print(Z)
#7
XZ={"ESTARE","SIEMPRE","CONTIGO"}
XZ.clear()
print(XZ)
#8
A={1,10,100,2,20,200}
A.clear()
print(A)
#9
C={"AA","HOLA","BB","AYUDA","CC","ESTOY ACA"}
C.clear()
print(C)
#10
Z=set("UNIVERSIDAD")
Z.clear()
print(Z)

# 10 EJEMPLOS DE CLONADO
#1
XZ={1,9,"W","K","G","J"}
x=XZ.copy()
print(x)
#2
X=set()
Z=X.copy()
print(Z)
#3
A=set("lista")
F=A.copy()
print(F)
#4
CX={1,2,3,4,5}
B=CX.copy()
print(B)
#5
Z={"HOLA","A","TODOS"}
C=Z.copy()
print(C)
#6
SA=set("BIENVENIDO")
D=SA.copy()
print(D)
#7
XZ={1,9,10,0,2,6,"G","g"}
x=XZ.copy()
print(x)
#8
I={"NUMER0",12,"DNI",1234567,"NOMBRE","ALEX"}
S=I.copy()
print(S)
#9
XZO=set("preguntastepormi")
R=XZO.copy()
print(R)
#10
X={"FE","EN","DIOS"}
x=X.copy()
print(x)

# 10 EJEMPLOS DE EXTRACCION:
#1
A={1,2,3,4,5}
Z=A.pop()
print(Z)
#2
S={"YO","SOY","EL","QUE","SOY"}
ZZ=S.pop()
print(ZZ)
#3
SA={1,10}
S=SA.pop()
print(S)
#4
CX={"A","E","I","O","U","W"}
C=CX.pop()
print(C)
#5
WA={"dime","que","si"}
V=WA.pop()
print(V)
#6
D={"A",1,"B",2,"C",8}
SA=D.pop()
print(SA)
#7
D1={"A","J"}
S=D1.pop()
print(S)
#8
S=set("HOLA")
DS=S.pop()
print(DS)
#9
CX={"A","E","I","O","U","W"}
X=CX.pop()
print(X)
#10
X={"TE","DIGO","AMOR"}
A=X.pop()
print(A)

#10 EJEMPLOS DE SEPARACION
#1
D1={"A","J"}
D1.remove("A")
print(D1)
#2
A={"SOLO","VIVE","LA","VIDA"}
A.remove("SOLO")
print(A)
#3
B={"hermosura","pasajera"}
B.remove("pasajera")
print(B)
#4
C={1,2,3,4,5,6,7,8}
C.remove(8)
print(C)
#5
D={"ELEMINA","PECADO"}
D.remove("PECADO")
print(D)
#6
E=set("UNIVERSO")
E.remove("O")
print(E)
#7
F={"a","avion","u","unia","i"}
F.remove("i")
print(F)
#8
G={"UNO",1,"DOS",2,"TRES",3}
G.remove("TRES")
G.remove(3)
print(G)
#9
q={"lista","nombres","varones"}
q.remove("varones")
print(q)
#10
d={"nombre","GINO","BANCES","VALDERA"}
d.remove("nombre")
print(d)

# 10 EJEMPLOS DE ORDENADO:
#1
ali={1,3,5,2,7,9,8,4}
print(set(sorted(ali)))
#2
Be={2,9,23,1}
print(set(sorted(Be)))
#3
Ce={"B","D","A","C"}
print(set(sorted(Ce)))
#4
Di=set("NIF")
print(sorted(Di))
#5
Elo=set("AIOUE")
print(sorted(Elo))
#6
Fa={"E","O","A","U","I"}
print(sorted(Fa))
#7
Gs={"g1","g12","g123"}
print(sorted(Gs))

#8
Hla={-1,-4,-8,22,12}
print(sorted(Hla))
#9
Iw=set()
print(sorted(Iw))
#10
Jo=set("loa")
print(sorted(Jo))

# 10 EJEMPLOS DE UNION
#1
s={1,2,3,4,5}
p={6,7,8,9}
x=s.union(p)
print(x)
#2
s1=set()
s2=set("ABC")
z=s1.union(s2)
print(z)
#3
d1=set("HE")
d2=set("LLO")
d3=d1.union(d2)
print(d3)
#4
r={12,13,14,"TRES"}
r1={"NUMEROS","CONSECUTIVOS"}
w1=r.union(r1)
print(w1)
#5
ae={"LA","LE","LI"}
a2={"LO","LU"}
f=ae.union(a2)
print(f)
#6
p={"ingeneria","civil"}
q={"electronica","carreras"}
ret=p | q
print(ret)
#7
pot=set()
de={"LUZ","OSCURIDAD"}
A=pot.union(de)
print(A)
#8
numer={"hola",1,2,3}
sil={"probando","microfono"}
sa=numer|sil
print(sa)
#9
telo={"nombres","propios"}
fei={"GINO"}
tea=telo.union(fei)
print(tea)
#10
tre=set("tren")
dim={"velocidad",100}
fbi=tre | dim
print(fbi)

# 10 EJEMPLOS DE DEIFERENCIA
#1
A={1,2,4,6}
B={4,5,6}
S=A-B
print(S)
#2
a={10,20}
b={20,41}
s=a-b
print(s)
#3
n={1,20,2}
m={21,40,2}
p=n-m
print(p)
#4
NOM=set("PROFESOR")
DES=set("PROFE")
RES=NOM-DES
print(RES)
#5
X={"DIME","TU","NOMBRE"}
Y={"DIME","TU","APELLIDO"}
Z=X-Y
print(Z)
#6
V1={1,5,"HOLA"}
V2={5,10}
V=V1-V2
print(V)
#7
numero={1,2,3,4,5}
nombre=set()
resultado=numero-nombre
print(resultado)
#8
TU={"QUIERES","CASARTE","SI","NO"}
YO={"NO"}
SOY=TU-YO
print(SOY)
#9
A={"SOMOS","UNO"}
B={"UNO","UNIDOS"}
C=A-B
print(C)
#10
EN={1,2,3,4}
SOLO={1,2,3,4}
PRIN=EN-SOLO
print(PRIN)

# 10 EJEMPLOS DE INTERSECCION
#1
A={1,2,4,6}
B={4,5,6}
S=A&B
print(S)
#2
a={10,20}
b={20,41}
s=a&b
print(s)
#3
n={1,20,2}
m={21,40,2}
p=n&m
print(p)
#4
NOM=set("PROFESOR")
DES=set("PROFE")
RES=NOM&DES
print(RES)
#5
X={"DIME","TU","NOMBRE"}
Y={"DIME","TU","APELLIDO"}
Z=X&Y
print(Z)
#6
V1={1,5,"HOLA"}
V2={5,10}
V=V1&V2
print(V)
#7
numero={1,2,3,4,5}
nombre=set()
resultado=numero&nombre
print(resultado)
#8
TU={"QUIERES","CASARTE","SI","NO"}
YO={"NO"}
SOY=TU&YO
print(SOY)
#9
A={"SOMOS","UNO"}
B={"UNO","UNIDOS"}
C=A&B
print(C)
#10
EN={1,2,3,4}
SOLO={1,2,3,4}
PRIN=EN&SOLO
print(PRIN)

# 10 EJEMPLOS DE DIF.SIMETRICA
#1
s={1,2,3}
p={2,3,4}
x=s^p
print(x)
#2
a={10,20}
b={20,41}
s=a^b
print(s)
#3
ai=set()
ie=set("VIDA")
wf=ai^ie
print(wf)
#4
TU={"QUIERES","CASARTE","SI","NO"}
YO={"NO","ACEPTO"}
SOY=TU^YO
print(SOY)
#5
EN={1,2,3,4,7,8}
SOLO={1,2,3,4,5,6}
PRIN=EN^SOLO
print(PRIN)
#6
ao={1,2,3,"llego"}
bi={4,5,3,"la","vida"}
sr=ao^bi
print(sr)
#7
numero={1,2,3,4,5,"a"}
nombre=set("ab")
resu=numero&nombre
print(resu)
#8
qi={1,2,3,4,5}
ti={"holi",1,2}
st=qi^ti
print(st)
#9
wo={"progrmacion",2}
we=set()
asp=wo^we
print(asp)
#10
d={"hola","si","tu"}
d1={"hola","si","tu",1}
pt=d^d1
print(pt)

# FIN_SETS