-1
def write_users_group(heading_writer, heading, user_writer, users):

    heading_writer.writerow([f"{heading}", f"{len(users)} users"])
    user_writer.writeheader()
    for user in users:
        user_writer.writerow(user)
    heading_writer.writerow([" "])

Error:

File "/Users/ashirwadniv/Downloads/gitlab/users.py", line 59

heading_writer.writerow([f"{heading}", f"{len(users)} users"])
                                    ^
SyntaxError: invalid syntax
John Kugelman
  • 349,597
  • 67
  • 533
  • 578

1 Answers1

1

This syntax is only allowed for Python version 3.6 and above. Check/Upgrade your Python version.

Fyi, there is nothing wrong with your syntax provided the python version supports it.

Beast
  • 370
  • 2
  • 14