Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
create objects from file
#1
Hi
I have created a class student and a constructor where there are 4 arguments ie, name and 3 subjects.
I have created an object with name and marks of 3 subjects. It worked fine and gave desired output.
Now i want to read students name and marks from a txt file. I open and read txt file but i am unable to break the line to name and marks. Can anyone solve this problem
my txt file info is
first,last,60,40,80
...................
Reply


Messages In This Thread
create objects from file - by faizahsan66 - Aug-23-2017, 06:48 AM
RE: create objects from file - by faizahsan66 - Aug-24-2017, 06:42 AM
RE: create objects from file - by ichabod801 - Aug-24-2017, 11:38 AM
RE: Newbie Question - by Larz60+ - Aug-23-2017, 08:45 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Create Choices from .ods file columns cspower 3 605 Dec-28-2023, 09:59 PM
Last Post: deanhystad
  Recommended way to read/create PDF file? Winfried 3 2,895 Nov-26-2023, 07:51 AM
Last Post: Pedroski55
  Use PM4PY and create working file thomaskissas33 0 668 Nov-14-2023, 06:53 AM
Last Post: thomaskissas33
  Create csv file with 4 columns for process mining thomaskissas33 3 757 Nov-06-2023, 09:36 PM
Last Post: deanhystad
  create exe file for linux? korenron 2 983 Mar-22-2023, 01:42 PM
Last Post: korenron
  my first file won't create itself MehHz2526 2 903 Nov-27-2022, 12:58 AM
Last Post: MehHz2526
  Create multiple/single csv file for each sql records mg24 6 1,399 Sep-29-2022, 08:06 AM
Last Post: buran
Sad pandas writer create "corrupted" file freko75 1 2,822 Jun-14-2022, 09:57 PM
Last Post: snippsat
  create new log file on logging? korenron 6 2,304 Mar-22-2022, 07:14 AM
Last Post: korenron
  Create zip file from the BLOB column in ORACLE DB nnsatpute 2 1,941 Dec-31-2021, 11:00 AM
Last Post: ibreeden

Forum Jump:

User Panel Messages

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