0
I have the following program
#Faça um programa que percorra duas listas e gere uma terceira sem elementos repetidos.
x = []
y = []
z = []
while True:
n = int(input("digite um número(0 sai): "))
if n == 0:
break
x.append(n) and y.append(n + 1)
c = x[x] + n[x]
#aqui sai a falha com TypeError: list indices must be integers or slices, not list
while c < len(z):
z = [c]
print(z[x])
c += 1
my doubt is how do I add each item of the lists x and y, after that add these items in the list z, how can I do this?
that’s right, the exercise as it is for me doesn’t necessarily specify whether I need to add or concatenate the 2 both ways how it doesn’t have something exact I believe it works, thank you
– Rodrigo Alexandre Ribeiro