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: list indices must be integers or slices, not str
- Cannot find module cv2 when using OpenCV
- What is the purpose of meshgrid in Python / NumPy?
- Python ‘If not’ syntax [duplicate]
- RuntimeWarning: invalid value encountered in divide
- Numpy ValueError: setting an array element with a sequence. This message may appear without the existing of a sequence?
- How do I create an empty array/matrix in NumPy?
- ValueError: operands could not be broadcast together with shapes (5,) (30,)
- WinError 2 The system cannot find the file specified (Python)
- numpy matrix vector multiplication
- 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’)
- Local variable referenced before assignment?
- ImportError: numpy.core.multiarray failed to import
- Python Traceback (most recent call last)
- How to pip or easy_install tkinter on Windows
- 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]
- Why are Python’s ‘private’ methods not actually private?
- How to find list intersection?
- Using Numpy Vectorize on Functions that Return Vectors
- Remove list from list in Python
- Is arr.__len__() the preferred way to get the length of an array in Python?
- python socket.error: [Errno 98] Address already in use
- 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
- initialize a numpy array
- How to access the ith column of a NumPy multidimensional array?
- Dump a NumPy array into a csv file
- Python: find position of element in array
- Add list to set?
- numpy with python: convert 3d array to 2d
- Python: slicing a multi-dimensional array
- Shuffle an array with python, randomize array item order with python
- How do I get an empty array of any size in python?
- TypeError: list indices must be integers or slices, not str
- Checking whether pip is installed?
- Add single element to array in numpy
- Decoding UTF-8 strings in Python
- Two dimensional array in python
- Make list of arrays in python
- Python – ‘ascii’ codec can’t decode byte
- Python Error – int object has no attribute
- Difference between scikit-learn and sklearn
- How to fix “TypeError: len() of unsized object”
- Loading a file with more than one line of JSON into Pandas
- How to detect key presses?
- What is the difference between json.load() and json.loads() functions
- Numpy.dot TypeError: Cannot cast array data from dtype(‘float64’) to dtype(‘S32’) according to the rule ‘safe’
- How to XOR two strings in Python
- How to get the unit vector from a numpy array
- TypeError: ‘_io.TextIOWrapper’ object is not subscriptable
- Iterating over a 2 dimensional python list [duplicate]
- Good ways to “expand” a numpy ndarray?
- Python: Can a function return an array and a variable?
- Python 101: Can’t open file: No such file or directory
- Split a python list into other “sublists” i.e smaller lists
- TypeError: argument of type ‘NoneType’ is not iterable
- numpy-equivalent of list.pop?
- Efficiently sorting a numpy array in descending order?
- How to create a numpy array of all True or all False?
- How to create a numpy array of lists?
- Removing nan values from an array
- If list index exists, do X
- Installation of pygame with Anaconda
- urllib and “SSL: CERTIFICATE_VERIFY_FAILED” Error
- Rotating a two-dimensional array in Python
- ImportError: cannot import name NUMPY_MKL
- Python: Pandas pd.read_excel giving ImportError: Install xlrd >= 0.9.0 for Excel support
- How can I copy a Python string?
- How do I merge lists in python? [duplicate]
- Convert string to variable name in python
- Counting array elements in Python
- What is the meaning of “int(a[::-1])” in Python?
- numpy array concatenation error: 0-d arrays can’t be concatenated
- inverting image in Python with OpenCV
- How to print the full NumPy array, without truncation?
- dump() missing 1 required positional argument: ‘fp’ in python json
- How to completely uninstall python 2.7.13 on Ubuntu 16.04
- Spell Checker for Python
- Installing scipy for python 2.7
- Hashing arrays in Python
- How can I install a .egg Python package on Windows (attempt using easy_install not working)
- In python, how can I print lines that do NOT contain a certain string, rather than print lines which DO contain a certain string:
- input() error – NameError: name ‘…’ is not defined
- Homebrew brew doctor warning about /Library/Frameworks/Python.framework, even with brew’s Python installed
- Cannot remove entries from nonexistent file