The 365 Data Science team is proud to invite you to our own community forum. A very well built system to support your queries, questions and give the chance to show your knowledge and help others in their path of becoming Data Science specialists.
Anybody can ask a question
Anybody can answer
The best answers are voted up and moderated by our team

Help yourself with Methods

Help yourself with Methods

Super Learner

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 Answer

365 Team

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.