I'm getting an invalid syntax error on the "for account in accounts" loop, why?
Please help, I've been struggling with this for a bit now
app.send(
functions.channels.InviteToChannel(
channel=app.resolve_peer("xyz123"),
users=[
for account in accounts:
app.resolve_peer(accounts)
]
)
)
[app.resolve_peer(accounts) for account in accounts]is a list comprehension, not a for-loop. You're confusing the two. A list comprehension is an expression which returns a list of some sort. A for-loop is a command, not an expression.