Dec-12-2018, 07:09 PM
Using Linux Mint 18.2 and Python 3.5.2 as before I'm old school basic.
Need help with this array type problem.
tia
oldcity
Need help with this array type problem.
tia
oldcity
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
#!/usr/bin/python3 #AT&T #FP&L #WATER #GAS #PLAN-D #AARP #DIAZ #DRUGS #HOUSE #CAR #MISC lcnt = 0 with open ( 'COL-HDRS-Sel4' , 'r' ) as catgs: for line in catgs: lcnt + = 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 " ) |