Beginner, Python

Can someone please explain why my final print is printing twice?

data inputs
print("Welcome to Test")
fn = input('First name: ')
ln = input('Last name: ')
#print(fn,ln)
#data search
xan = fn , ln
#print(xan)
dan = list(xan)
#print(dan)
man = dan[0]
print(man)
for j in dan:
	print('Olay, Found.')

Hello there,

Because you are looping over each element of dan. Print out dan to see why:

print(dan)

Hope this helps

1 Like

Oh okay. Thank you. it does help please