A jagged array is an array whose elements are arrays. The elements of a jagged array can be of different dimensions and sizes
Python documentation about Data Structures.
You could store a list inside another list or a dictionary that stores a list. Depending on how deep your arrays go, this might not be the best option.
numbersList = [] listofNumbers = [1,2,3] secondListofNumbers = [4,5,6] numbersList.append(listofNumbers) numbersList.append(secondListofNumbers) for number in numbersList: print(number)
Related Posts:
- Create 3D array using Python
- Understanding NumPy’s einsum
- Using numpy to build an array of all combinations of two arrays
- Convert a 1D array to a 2D array in numpy
- How to declare an array in Python?
- TypeError: ‘int’ object is not subscriptable
- TypeError: list indices must be integers or slices, not str
- ValueError: setting an array element with a sequence
- TypeError: ‘int’ object is not callable
- TypeError: only size-1 arrays can be converted to Python scalars (matplotlib)
- TypeError: ‘int’ object is not callable
- How to make a flat list out of a list of lists
- TypeError: ‘int’ object is not callable
- Cannot find module cv2 when using OpenCV
- What is the purpose of meshgrid in Python / NumPy?
- Cannot find module cv2 when using OpenCV
- Python ‘If not’ syntax [duplicate]
- RuntimeWarning: invalid value encountered in divide
- Converting dictionary to JSON
- Numpy ValueError: setting an array element with a sequence. This message may appear without the existing of a sequence?
- numpy: Invalid value encountered in true_divide
- How do I create an empty array/matrix in NumPy?
- ValueError: operands could not be broadcast together with shapes (5,) (30,)
- How does numpy.newaxis work and when to use it?
- WinError 2 The system cannot find the file specified (Python)
- numpy matrix vector multiplication
- IndexError: tuple index out of range —– Python
- sklearn error ValueError: Input contains NaN, infinity or a value too large for dtype(‘float64’)
- sklearn error ValueError: Input contains NaN, infinity or a value too large for dtype(‘float64’)
- TypeError: cannot perform reduce with flexible type
- Could not find a version that satisfies the requirement tensorflow
- sklearn error ValueError: Input contains NaN, infinity or a value too large for dtype(‘float64’)
- Could not find a version that satisfies the requirement tensorflow
- Local variable referenced before assignment?
- ln (Natural Log) in Python
- ImportError: numpy.core.multiarray failed to import
- Convert pandas dataframe to NumPy array
- Python Traceback (most recent call last)
- Unable to plot Double Bar, Bar plot using pyplot for ndarray
- How to pip or easy_install tkinter on Windows
- Cannot find module cv2 when using OpenCV
- Convert list to tuple in Python
- ImportError: numpy.core.multiarray failed to import
- How to count the occurrence of certain item in an ndarray?
- size of NumPy array
- Python List vs. Array – when to use?
- How to remove \xa0 from string in Python?
- What is the meaning of [:] in python [duplicate]
- ValueError: all the input arrays must have same number of dimensions
- Why are Python’s ‘private’ methods not actually private?
- How to find list intersection?
- ValueError: setting an array element with a sequence
- Using Numpy Vectorize on Functions that Return Vectors
- Remove list from list in Python
- How to create a new text file using Python
- Is arr.__len__() the preferred way to get the length of an array in Python?
- TypeError: write() argument must be str, not bytes (Python 3 vs Python 2 )
- python socket.error: [Errno 98] Address already in use
- How to import files in python using sys.path.append?
- How to initialize a two-dimensional array in Python?
- Is there a NumPy function to return the first index of something in an array?
- Numpy/Python Array Value error
- How do I install the yaml package for Python?
- Python: Array v. List
- Check string “None” or “not” in Python 2.7
- Change figure size and figure format in matplotlib
- initialize a numpy array
- load csv into 2D matrix with numpy for plotting
- how to update spyder on anaconda
- how does \r (carriage return) work in Python
- What is Python buffer type for?
- How to initialize a two-dimensional array in Python?
- AttributeError(“‘str’ object has no attribute ‘read'”)
- How to access the ith column of a NumPy multidimensional array?
- IndexError: index 1 is out of bounds for axis 0 with size 1/ForwardEuler
- Dump a NumPy array into a csv file
- Python: find position of element in array
- Python Save to file
- Add list to set?
- numpy with python: convert 3d array to 2d
- Python: slicing a multi-dimensional array
- TypeError: unsupported operand type(s) for -: ‘list’ and ‘list’
- ImportError: No module named scipy
- AttributeError: ‘datetime’ module has no attribute ‘strptime’
- Shuffle an array with python, randomize array item order with python
- Python add item to the tuple
- How do I get an empty array of any size in python?
- How to remove specific elements in a numpy array
- TypeError: list indices must be integers or slices, not str
- Checking whether pip is installed?
- Add single element to array in numpy
- Python: Write array values into file
- How to create an array of bits in Python?
- Converting binary to decimal integer output
- Decoding UTF-8 strings in Python
- How can I read pdf in python?
- No module named setuptools
- Two dimensional array in python
- How to normalize a 2-dimensional numpy array in python less verbose?
- ValueError: unsupported pickle protocol: 3, python2 pickle can not load the file dumped by python 3 pickle?