I am trying to print a list of groups in AWS.
Of these lines only one line is producing an indentation error. If I use this code:
group_list = client.list_groups()
print("Group List for %s:")
for group in group_list['Groups']:
group_name = group['GroupName']
print(group_name)
I get this error:
File ".\aws_iam_utils.py", line 966
print(group_name)
^
TabError: inconsistent use of tabs and spaces in indentation
But if I remove the line print(group_name)
the program runs.
I tried both adding that line with 4 spaces and when that didn't work I added it with one tab.
It's at the exact same indentation level as the previous line. So I don't know why this error is happening.