inp = [[0,1,2,3,4,5], [0,1,2,3,4,5], [0,1,2,3,4,5]]
# out = [0****0, *1**1*, **22**]
out = [] # here we create a list for finale output, now it's empty
count = 0 #this variable count we use for knowing what is the index iterable element
for i in inp: # ordinary for loop, we eterate inp. on first iteration i == inp[0], on sec i == inp[1], etc
s = list('*'*len(i)) #the same as as_digit(lengh of element i ) times '*'. like ['*','*','*','*','*','*',]
s[count] = str(i[count]) #here we change list s by index count. it's to equal index count from i
s[-(count+1)] = str(i[count]) #the same action but from right side
out.append(''.join(s)) #''.join(s) makes list s into just string, out.append() append to out
count+=1 #each eteration we +1 to count for knowing the index of i in inp during next iteration
print(out) #['0****0', '*1**1*', '**22**']
3
solved please help me with this python exercise [closed]