Last answered:

13 Oct 2020

Posted on:

08 Oct 2020

0

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)
Instructor
Posted on:

13 Oct 2020

0
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[3]))
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.
Best,
Martin

Submit an answer