The extend()
method appends to the existing array and returns None
. In your case, you are creating an array — [4, 5, 6]
— on the fly, extending it and then discarding it. The variable b
ends up with the return value of None
.
More Related Contents:
- I have a list of file names and I need to be able to count how many of the same file gets repeated for each file name [closed]
- How are array types (lists and tuples) and for loops related in Python? [closed]
- What are the advantages of NumPy over regular Python lists?
- How is Python’s List Implemented?
- Python List vs. Array – when to use?
- How to read a text file into a list or an array with Python
- Why can tuples contain mutable items?
- Flatten list of lists [duplicate]
- a mutable type inside an immutable container
- Can I create a “view” on a Python list?
- Find nearest indices for one array against all values in another array – Python / NumPy
- Immutable numpy array?
- Sort multidimensional array based on 2nd element of the subarray
- Initializing a list to a known number of elements in Python [duplicate]
- How to read an array of integers from single line of input in python3
- Implement list-like index access in Python
- List to array conversion to use ravel() function
- Numpy individual element access slower than for lists
- How to group elements in python by n elements [duplicate]
- How do I declare an array in Python?
- Identify duplicate values in a list in Python
- Does Python have an immutable list?
- How to access a column in a list of lists in python
- How to sort multidimensional array by column?
- Python list([]) and []
- Python recursive function to display all subsets of given set
- Python: Elegant and efficient ways to mask a list
- Optimal method to find the max of sublist items within list
- PIL: Convert Bytearray to Image
- Finding the indices of matching elements in list in Python