Vectors in Python? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Vectors in Python?

I was making a Python program in which you can create instances of a class. I wanted to store them in something like a C=+ vector but I couldn't find such a thing :(. I don't want to use a classic list with 50 elements!

29th Nov 2019, 10:38 AM
Elfahor
2 Answers
+ 4
C++ vectors seem to be quite similar to Python lists! You can insert, remove, append, pop... What about lists is different to what you need?
29th Nov 2019, 11:09 AM
HonFu
HonFu - avatar
+ 4
Can you give us short sample of how one "point" of your vector looks like?
29th Nov 2019, 10:51 AM
Lothar
Lothar - avatar