Data Structure.14

How is this not an array?

my_array = [[Seb, Nephew], [Luchi, Godchild], [Lisa, Mom]]

Same here I am inputting:

my_array = [[jordan, pippen], [lebron, bryant]]

It isn’t working… ? How are these not viable strings for an array? Seems kind of restricted to me… and ontop of that there is little information provided saying otherwise!

Hi OPDL and @rvhul,

That is an array, but you both seem to be forgetting the difference between a string and a variable - it’s not much:


Yeah. It’s only the quotes that differentiate a string from a variable. Your code is looking for a variable called Seb, or a variable called Nephew, and not finding one. If you your strings in quotes, they’ll become strings and your troubles should vanish :slight_smile:

1 Like

4 posts were split to a new topic: Oops, try again. Did you declare an array called my_array?

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.