What is wrong in the following code? How do you fix it?
title = "Chapter " + 1
It shows the error :
TypeError: can only concatenate str (not "int") to str
we can fix this error by following code
title = "Chapter " + str(1)
print(title)
Output:
Chapter 1
>