VOOZH about

URL: https://www.geeksforgeeks.org/python/how-to-add-floats-to-a-list-in-python/

⇱ How to Add Floats to a List in Python - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

How to Add Floats to a List in Python

Last Updated : 23 Jul, 2025

Adding floats to a list in Python is simple and can be done in several ways. The easiest way to add a float to a list is by using the append() method. This method adds a single value to the end of the list.


Output
[1.2, 3.4, 5.6, 7.8]

Let's look into Other various methods that are used to Add Floats to a List in Python.

Using extend()

If we want to add multiple float numbers at once, we can use the extend() method. This method adds all the elements from one list to another.


Output
[1.2, 3.4, 5.6, 7.8, 9.0]

Using insert()

If we want to add a float at a specific position in the list, we can use the insert() method. This method allows us to add a value at any index.


Output
[1.2, 2.3, 3.4, 5.6]

Using list concatenation

Another way to add floats to a list is by using the + operator to concatenate two lists. This method creates a new list by combining two lists together.


Output
[1.2, 3.4, 5.6, 7.8, 9.0]
Comment