Q. How are the statements Ist = += "xy" and Ist = Ist + "xy" different, where Ist is a list? Explain.


Answer =

Ist = += "xy" here is syntax error.

Ist = Ist + "xy" will give an error.

Because when used with lists, the + operator requires both the operands as list-types.

8 Comments

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

Post a Comment

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

Previous Post Next Post