Issue
I receive an IndentationError: unindent does not match outher indentation level). I wrote the following code
if in_files[idx] not in results_dic:
results_dic[in_files[idx]] = [pet_label]
else print("** Warning: Duplicate files exist in directory:" , in_files[idx])
else print("** Warning: Duplicate files exist in directory:" in_files[idx])
I want to get rid of the IndentationError, Please can someone help me. Thank you.
Solution
If your code is already in the form below, check that line 2 and 4 use only tabs or spaces. Confirm that you did not use tab for one line and spaces for another line. If you used spaces for both lines 2 and 4, confirm that you indented by exactly the same number of spaces. For lines 1 and 3, confirm that there is no space at the beginning of either line.
if in_files[idx] not in results_dic:
results_dic[in_files[idx]] = [pet_label]
else:
print("** Warning: Duplicate files exist in directory:", in_files[idx])
Answered By - C. Zona
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.