0
Need Explanation about these coding!
counter=0 list1=["Hello!", "I'am","Happy","to","see","you",["Why","are","you","me?"]] while counter <= (len(list1)-2): print(list1[counter]) counter+=1 print("."*20) counter=0 while counter <= (len(list1)-1): if counter<=2: print(list1[len(list1)-1][counter]) elif counter <=(len(list1)-2): print(list1[counter-1]) else: print(list1[(len(list1)-1)][3]) counter+=1
1 Answer
0
A bit general your request. Better describe which part you do not understand.
First loop prints all items except the last one, which is an array. Second loop prints first three entries of that array (counter <= 2), then from entry three on again all of the outer Array, except the last entry. Finally the last entry of the inner array is printed.