I want to produce the output in a list format but I am failing.

It's taking some login details from a text file:

```none
Ip1,username1,pwd1

Ip2,username2,pwd2

Ip3,username3,pwd3

Ip4,username4,pwd4

```

**My Python script:**

```
import os.path

save_path = "C:\Users\Public\Pythonlearn"

input_pwd_file= os.path.join(save_path,'loginfile'+'.txt')

with open(input_pwd_file) as f:

    list = []

    for line in f:

        list.append(line)

    a=list[3] 

print "login details: ",a

```

I am getting below output:

```
login details: Ip4,username4,pwd4

```

But I want it to be like:

```
login details: ['Ip4','username4','pwd4']

```