Python Forum

Full Version: Newbie here. Create an array from file data?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm brand new with python. I have a file with integers like this:

2 5 8 12 20
3 12 15 18 29
etc,
etc,
etc,
.
.
etc.

I need to get them into an array (I think) so I can evaluate each integer and perform some computations on them.

Just looking for a hint on how to get the integers into the array.

Appreciate it.

Ray
Have a look at python list
(Jan-13-2023, 12:37 AM)Rayj00 Wrote: [ -> ]I need to get them into an array (I think)

First rule of problem solving is defining the desired objective. If you don't know what your objective is then it's next to impossible to solve the problem.