0
i input two Names having first name and last name, but this code is not printing both names ? can anyone help?
https://code.sololearn.com/cuHi46OIQxND/#py input Muhammad Ahad yes Muhammad Imran OutPut MuhammadImran
5 Respuestas
+ 2
And what is the problem again?
It seems to work correctly, it outputed all names.
Only problem was when you inputed two names with same firstname and different lastname.
+ 1
Because you set up variable (object property) with name like "firstname" and asign value like "lastname".
So with second name with same firstname it owerwrites the previous.
+ 1
You're welcome
0
Oh i was putting same first name all the time.. sorry to bother you.. but why it dont work with same first name..
0
ohh... i got it.. same key ,so it assign it to a new value.. thanks for helping.. 😊