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.

2 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

  1. Replies
    1. Because in python if we write two or more characters separated by comma then it becomes a tuple.

      Delete

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post