In an Intro to Data Science course, the assignment is to find four regular expressions to match the IP address, the time, the user name, and the HTTP method from a file called "logdata" and build a list of dictionaries.

A typical line from the file looks like:

```
146.204.224.152 - feest6811 [21/Jun/2019:15:45:24 -0700] "POST /incentivize HTTP/1.1" 302 4622

```

Using `re.findall()`, the following regular expressions work:

```
re.findall('(?P<time>\[(.+?)\])', logdata)

re.findall('(?P<method>".*?")', logdata)

re.findall('(?P<host>\d+\.\d+\.\d+\.\d+)', logdata)

re.findall('(?P<user_name>-\s[\w-]*)', logdata)

```

but when putting them together for an iteration (using `re.finditer()`), such as:

```
for i in re.finditer('(?P<time>\[(.+?)\])(?P<host>(\d+\.\d+\.\d+\.\d+)(?P<tag>".*?")(?P<host>\d+\.\d+\.\d+\.\d+)', logdata):
    f = i.groupdict()  #f is a list

```

it does not work.