[issue46093] 2D array issue

2021-12-15 Thread Eric V. Smith
Eric V. Smith added the comment: problem_ary[:] creates a copy of problem_ary, so it's equal to: >>> problem_ary[:] [['a', 'b', 'c'], ['d', 'e', 'f'], ['g', 'h', 'i']] The [1] element of that is: >>> problem_ary[:][1] ['d', 'e', 'f'] So this is working as expected. I suggest you ask on

[issue46093] 2D array issue

2021-12-15 Thread Ritvik S
New submission from Ritvik S : I had a problem running the following code. When I ran through what I thought python was supposed to do, I got a different answer than what python did. I think this is an error. Here is the code: problem_ary = [['a','b','c'],['d','e','f'],['g','h','i']]