Computer Science, asked by bhuvneshchatrath, 4 months ago

[4]
Q.7 Write the output of the following question
(a) list1=('Red', 'Green')
list2-[10,20,30]
print(list 1+list2) in python​

Answers

Answered by jeyuva04
0

I think you made a typing mistake in line 2

In line 3

TypeError: can only concatenate tuple (not "list") to tuple

Explanation:

variable list1 contains strings as values

and variable list2 contains integers as values

In 3rd line it is trying to concatenate both list1 and list2

concatenation can be done only with strings

python can't concatenate strings and integers

Similar questions