If you want to append a list at the start (beginning) of another list in Python then you can do that in many ways, let's take a look at a few.
Example 1: Using extend() function
nos_list_1 = [2, 4, 0]
nos_list_2 = [-1, -2, -7] # append this list to list_1
nos_list_2.extend(nos_list_1)
print(nos_list_2)
Output:
[-1, -2, -7, 2, 4, 0]
Example 2: Using + Operator
nos_list_1 = [2, 4, 0]
nos_list_2 = [-1, -2, -7]
appended_list = nos_list_2 + nos_list_1
print(appended_list)
Output:
[-1, -2, -7, 2, 4, 0]
Example 3: Using Unpacking
nos_list_1 = [2, 4, 0]
nos_list_2 = [-1, -2, -7]
appended_list = [*nos_list_2, *nos_list_1]
print(appended_list)

-
Facing issues? Have Questions? Post them here! I am happy to answer!
More Posts related to Python,
- Python: Convert Date to DateTime
- How to sort a List using Lambda in Python
- Python matplotlib segmentation fault: 11 macOS Big Sur
- What is Terminal Velocity and its Formula? How to calculate it programmatically?
- How to install Python 3.11 on Mac
- How to flatten a nested list in Python
- Python: Pandas Merge DataFrames on Index Example
- How to Run all Cells at Once Jupyter Notebook
- Python - Convert float to String
- How to add borders to tkinter label text
- How to Exit a Loop in Python Code
- [Python] Fix: ValueError: All arrays must be of the same length
- Sorting an array using Bubble Sort in Python Programming
- How to Unzip a file using Python
- Python: Merge DataFrames Pandas Outer Join Example
- Change label (text) color in tkinter
- Convert Float to String in Python
- Fix: fatal error: No such file or directory compilation terminated
- Python: Access index/counter of a for loop iteration
- Import Other Python Files Examples
- How to install Anaconda on Mac (M1/M2 Mac)
- Python Regular Expression to Find All Matches in List
- How to Read a binary File with Python
- How to disable warnings while Python file execution
- Know current Python Version
More Posts:
- Jupyter: Safari Cant Connect to the Server localhost:8888/tree - Python
- What version of windows do I have? - Microsoft
- Simple Crossword Puzzle example using Pure HTML, CSS and JavaScript - Html
- How to install AWS Toolkit for Visual Studio Code - AWS
- Emulator: Warning: restoring GLES1 context from snapshot. App may need reloading. - Android-Studio
- How to comment code in Python - Python
- Where are Notepad++ macros stored? - NotepadPlusPlus
- How to display Line Number in Eclipse IDE - Eclipse