Q. Predict the output:
tuple_a = 'a', 'b'
tuple_b = ('a', 'b')
print (tuple_a == tuple_b)
Answer:-
Output:-
True
>>>
>>>
Because in python if we write two or more characters separated by comma then it becomes a tuple.
tuple_a = 'a', 'b'
tuple_b = ('a', 'b')
print (tuple_a == tuple_b)
Answer:-
Output:-
Because in python if we write two or more characters separated by comma then it becomes a tuple.
Why is it true
ReplyDeleteBecause in python if we write two or more characters separated by comma then it becomes a tuple.
DeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )