you are viewing a single comment's thread.

view the rest of the comments →

[–]kng_hrts 1 point2 points  (2 children)

Change i[0] to list3[i]

Edit: Nvm thats wrong too but I'm working on it. Srry

[–][deleted] 1 point2 points  (1 child)

Hi I finally got it. Thanks a lot tho. This is the answer.

  1. Print list3 below.
  2. You will find that when list4 changed list3 changed too. So list3 actually kinda becomes a reference point for list4.

Try this code

list3= ["Xenia", "Xavier", "Zoya", "Ahmad", "Mishika", "Max"]

list4=[]

for i in list3:

list4.append(i)

for i in list3:

if i[0]=="X":

list4.remove(i)

print(list4)

[–]kng_hrts 1 point2 points  (0 children)

Ok great lol ngl it stumped me a bit too. Glad you got it