can you explain why i got this error message after replacing the comma with (+)???
2 answers ( 0 marked as helpful)
Hi! It's because the Numbers variable is an integer. When try to concatenate strings with an integer using the "+" sign, Python interprets it as an arithmetic sign instead of concatenation. You would either have to use commas or transform your integer into a string.
Hi Asmaa Abdulhamid
use this code instead:
print('The fourth element of the numbers list is:' + str(Numbers[3]) + '.')