Q. Predict the output:
Odd = 1, 3, 5
print (Odd + [2, 4, 6])[4])
print (Odd + (12, 14, 16] ) [4] - (Odd + [2, 4, 6] [4])
Answer =
It will give an error. Because according to the question Odd is a tuple, not List. So,
The correct code is :-
Odd = [1, 3, 5] print ((Odd + [2, 4, 6])[4]) print ((Odd + [12, 14, 16 ])[4] - (Odd + [2, 4, 6])[4] )
Output :-
4
10
>>>
10
>>>
The question is different as per my book.
ReplyDeleteIt is :
odd=[1,3,5]
print((odd+[2,4,6])[4])
print((odd+[12,14,16])[4]-(odd+[2,4,6])[4])
If this is Question then output =
Delete4
10
>>>
Thank you for Answer the other question
ReplyDeleteWelcome 😊😊😊
Deletethank u so muchh very helpful god bless frfr
ReplyDeleteWelcome : )
DeleteDon't give only the output ,please give the full answer for better understanding.
ReplyDeletePlease give the answers step by step.
DeleteI have given. Please check it again.
DeleteYou're currently saving me in 11th and you will save me in 12th too. Thank you.
ReplyDeleteit's my pleasure
DeleteIs there any video
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )