[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
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
Physics,
2 months ago
Psychology,
2 months ago
Social Sciences,
2 months ago
Science,
4 months ago
Math,
4 months ago
Social Sciences,
10 months ago
English,
10 months ago