Help yourself with Methods
Hi, why it can't be executed as per the lecture video? I able to do it with trailing comma, but just want to explore if there is another way to doing it.
1 answers ( 0 marked as helpful)
Hi Ethan! Thanks for reaching out. Please accept my apologies for the delayed response. What you need to also do to obtain the desired string is convert the 4th element from the Numbers list into a string yet while combining the two pieces of text. Here's the code that should deliver the result you are aiming for.
print ('The fourth element of the Numbers list is ' + str(Numbers))NB! Please note that by creation, Participants contains string values, while Numbers - numeric values (that need to be converted into a string while executing an operation as the one you are referring to. Hope this helps.