Reputation: 1
I need to get from list(file) who is coming to party and who is not.
File looks like this:
(+) John
(?) Jake
(+) Billie
How to read that person with + is coming ?
Upvotes: 0
Views: 42
Reputation: 93
file = open("your_file", "r")
c = []
for line in file:
if line[1] == '+':
c.append(line[4:].strip())
print(c)
Upvotes: 1