Jul-15-2019, 10:31 PM
Hi Ichabod, Thank you for your reply.
I'm sure its just my lack of understanding as this is all very new to me still. I have been taking classes through the datacamp site...still have a couple of courses to go. I haven't come across the mode function yet. Any recommendations for a more detailed self taught course?
When I tried to run the script I got this
File "C:/Users/Keith/Desktop/PY/venv/test.py", line 16
elif mode == 'Access':
^
IndentationError: expected an indented block
I'm sure its just my lack of understanding as this is all very new to me still. I have been taking classes through the datacamp site...still have a couple of courses to go. I haven't come across the mode function yet. Any recommendations for a more detailed self taught course?
When I tried to run the script I got this
File "C:/Users/Keith/Desktop/PY/venv/test.py", line 16
elif mode == 'Access':
^
IndentationError: expected an indented block
file = 'PYTHON GDL Resources.txt' rows = [] mode = 'nowhere' for line in file: if line: if mode == 'nowhere': mode = 'header' header_data = [] # resets the header info for each new section elif 'Access' in line: if 'No users with' in line: continue mode == 'access' if mode == 'header': # pull out header information and put it into header_data elif mode == 'Access': access_type, users = line.split(':') # everything after the colon for user in users.split(','): rows.append(header_data + [user.strip(), access_type.strip()]) else: mode = 'nowhere' # start looking for new section