What is the output of print list1 + list2, if list1 = [ 'abcd', 786 , 2.23, 'john', 70.2 ] and ist2 = [123, 'john']? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

What is the output of print list1 + list2, if list1 = [ 'abcd', 786 , 2.23, 'john', 70.2 ] and ist2 = [123, 'john']?

Give me answer of this question

18th Jul 2019, 12:52 PM
Ashish Yadav
Ashish Yadav - avatar
2 Answers
+ 4
It will print concatenated tuples. Output would be ('abcd', 786, 2.23, 'john', 70.200000000000003, 123, 'john').
18th Jul 2019, 1:14 PM
Ashish Yadav
Ashish Yadav - avatar
+ 2
A new list will form containing all values except John only once List=['abcd',783,2.23,'john',70.2,123 ]
18th Jul 2019, 1:00 PM
Ankul Chaudhary
Ankul Chaudhary - avatar