Avatar ·

How to convert a list of lists into a list of numbers (Python)

📁 Advanced Python Topics

I have:

[[1], [2], [3]]

I need:

[1, 2, 3]
Avatar ·

Use pip3 or python3 -m pip to run pip for Python 3

$ pip3 --versionpip 9.0.1 from /home/r033/.local/lib/python3.5/site-packages (python 3.5)$ python3 -m pip --versionpip 9.0.1 from /home/r033/.local/lib/python3.5/site-packages (python 3.5)

You can also install libraries through Ubuntu repositories, if they are available there.

sudo apt install python3-scipy

Log in to leave an answer

Blogs