with open('D:\\app\\ai\\app-grosir\\lib\\screens\\produk_screen.dart', 'r') as f: lines = f.readlines() depth = 0 for i in range(493, 644): line = lines[i] o = line.count('(') c = line.count(')') if depth == 0 and (o != 0 or c != 0): print(f'Depth became 0 at line {i+1}: {line.rstrip()}') depth += o - c if depth < 0: print(f'Negative depth at line {i+1}: {line.rstrip()}') break print(f'Final depth: {depth}')