2013-10-27 2 views
0

여기 여기 내 코드IndentationError : 예상 들여 쓰기 블록 (13)

def count (a, e, i, o, u): 
    a_length = len(a); 
    e_length = len (e); 
    i_length = len (i); 
    o_length = len (o); 
    u_length = len (u); 

    total = 0; 
    for i in range (a_lenght): 
     if(a[i] == u[0]): 
     end = i + u_length; 

     if (a[i:end] == u): 
     total +=1; 

입니다

• File "submission.py", line 11 
    end = i + u_length; 
^
IndentationError: expected an indented block 
+0

하나에 대해, 'if :'는 아마도 더 들여 쓰기 된 줄을 따라야합니다. 여기서 차이점은 없습니다. –

답변

4

당신은에 들여 쓰기를 추가해야합니다 오류

오류 숨기기 출력을하는 경우 파이썬에서 블록.

total = 0; 
for i in range (a_lenght): 
    if(a[i] == u[0]): 
     end = i + u_length; 

    if (a[i:end] == u): 
     total +=1; 
관련 문제