Python Forum
Newbie here. Create an array from file data?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Newbie here. Create an array from file data?
#1
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
Reply
#2
Have a look at python list
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags


Reply
#3
(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.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Create a turtle drawing from .txt file Noob101 20 8,749 Jan-29-2021, 04:13 PM
Last Post: nilamo
  how can i create a dictionary of dictionaries from a file Astone 2 2,209 Oct-26-2020, 02:40 PM
Last Post: DeaD_EyE
  create new variable that sums the array prasanthbab1234 3 2,280 Sep-26-2020, 02:03 PM
Last Post: jefsummers
  Array Dimensions - NEWBIE willowman 2 1,891 Apr-12-2020, 12:21 PM
Last Post: perfringo
  Store data in array kasper1903 4 3,028 Oct-04-2019, 12:43 PM
Last Post: kasper1903
  Using Data from an Array Tomington 1 2,346 Apr-06-2019, 10:42 AM
Last Post: perfringo
  How to check an array exist in a file using Python fitrisibarani 17 6,516 Feb-27-2019, 04:16 PM
Last Post: ichabod801
  Login Module Help - Comparing data in a text file to data held in a variable KeziaKar 0 2,221 Mar-08-2018, 11:41 AM
Last Post: KeziaKar
  Unable to create csv file Sumaira 2 3,203 Feb-06-2018, 03:43 AM
Last Post: Sumaira
  Call out data from 2D array to perform calculation poonck1 1 3,257 Feb-28-2017, 01:53 PM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020