+ 1
Why the line 7 is giving different out put for same type of data....?
https://code.sololearn.com/c6XIhesQg17h/?ref=app By default any input entered by the user is of type string. Then by entering savit twise the line 7 is giving False by entering 3 twise it's giving True. Once the "savit" Is treated as single object then both x and y are pointing to same object then it should show o/p as True.Can any one please explain...?
5 Antworten
+ 1
I assume because they are input and not literals translated at runtime like the literal strings that are the same
0
'is' has to do with their IDs (or addresses), not data type.
https://code.sololearn.com/c8q54ZtWLMp5/?ref=app
0
Slick both inputs are same but why they are stored in different address
0
Slick thank you so much 🤝😊
- 1
It doesn’t work