There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.
If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply () below!
You can also find further discussion and get answers to your questions over in Language Help.
Agree with a comment or answer? Like () to up-vote the contribution!
Hi, I’m having trouble with running the code in this lesson. It runs but the exercise still says I’ve done it incorrectly despite the “hint” indicating that I have done it correctly. Is there an issue with Codecademy Pro or am I missing something? My code is:
Hi, I have a question. I get that by using Plus we add something at the end of the list, but is there a way to ad something in another place, for example at the beginning or in the middle of it?
I tried orders += new_orders, and then printed orders and got [‘daisy’, ‘buttercup’, ‘snapdragon’, ‘gardenia’, ‘lily’, ‘lilac’, ‘iris’]. I get the same print out when I use the extend method. It also updates the orders variable without creating the new variable, new_orders, by using orders += [‘lilac’, ‘iris’]
@py4410902729 someone else in another FAQ had mentioned that the +=operator for lists functions exactly like .extend() method - so the same output would be expected. This method is the extension of the + operator that we learn on this exercise in that if you are not looking to create a new variable or list and just looking to update the existing one.
@gr3y_ht@krushnakantchavan559
The square brackets is what distinguish a list of objects versus just a single object. In the example you give, “my face” is just a single string object. List allows you to have multiple different elements stored with indices so you can recall them later.
You can always print individual objects within a list by doing print(list(i)), where i is the position of the object within the list with the first object having i = 0, second object with i = 1 and so on.