Q. Write an expression that adds the string "How are you?" to the front of all the elements of the tuple ('I am fine, thank you') and creates a new tuple out of it.
Answer =
>>> tup = ('I am fine, thank you',)
>>> newtup = ("How are you? ",) + tup
>>> newtup
('How are you? ', 'I am fine, thank you')
>>>
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )