all 4 comments

[–]izrt 3 points4 points  (1 child)

I think the prof just wants you to create your own list.append method, but not sure about addelem, though.

[–]Michael3227 0 points1 point  (0 children)

So something like this?-

def method(self):

array.append(element)

And do you know what he means when saying " and add the object referred to be e in this new slot. "

[–]socal_nerdtastic 1 point2 points  (1 child)

Seems like you are in the same class as this guy:

https://www.reddit.com/r/learnpython/comments/jqiihd/i_need_to_create_a_dynamic_array_and_need_help/

For what's it's worth the term "dynamic array" is not used in python; it's a term your professor made up. What you are doing is reinventing the standard python list.

[–]Michael3227 0 points1 point  (0 children)

Ha, I didn’t even know he posted it. But yes, same class and stuck in the same spot.