Python The code below returns an indention error at line 62

Python

The code below returns an indention error at line 62. How can I fix it

if len(password)>=8 and len(password)<=25:
58 correct_length = True
59 for ch in password:
60 if ch.isdigit():
61 has_digit = True
62 if ch.isalpha():
63 has_alpha = True
64

ÏIndentationError: unindent does not match any outer indentation level

Solution

Ans:

In line number 62 you have to change if ch.isalpha(): replace to if ch.isalpha:

62 if ch.isalpha:

Python The code below returns an indention error at line 62. How can I fix it if len(password)>=8 and len(password)<=25: 58 correct_length = True 59 for c

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site