As mentioned earlier my lifetime programming language was Basic.
I ran a test of your suggestion and it gives an error message I have
no idea how to deal with.
Any suggestion most helpful.
tia
oldcity
I ran a test of your suggestion and it gives an error message I have
no idea how to deal with.
Any suggestion most helpful.
tia
oldcity
#!/usr/bin/python3 dcatagory = '' lcnt = 0 with open('COL-HDRS-Sel4', 'r') as catgs: for lcnt, line in enumerate(catgs, 1) : dfiles = line.strip(",") dcatagory = dfiles.rstrip("\n") mcatg[lcnt] = dcatagory catg = 5 # catg value to be assigned later print ("\n") print(mcatg[catg]) print("bye ")Code produces this error message.
@oldcity ~/MyPython $ python3 fix-here Traceback (most recent call last): File "fix-here", line 8, in <module> mcatg[lcnt] = dcatagory @oldcity ~/MyPython $