tabs and spaces
is there a regular expression that will only find spaces and not tabs? The ettor is yelling at me to fix inconsistent tabs and spaces.
Voters
RYANTADIPARTHI
Solution
to fix that, it is easy. all you have to do is unindent everything, and indent them back again:
def make_passABC(): z = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M','N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'] langth = int(input('how log will the string be')) for i in range(0, langth): d = len(z)
and indent it again. back to normal:
def make_passABC(): z = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M','N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'] langth = int(input('how log will the string be')) for i in range(0, langth): d = len(z)
like that.
That should work
inyourface3445
@RYANTADIPARTHI but i have a lot of functions in my code. is there an easier way to do this?
RYANTADIPARTHI
@inyourface3445 no, you don't have to indent everything. only 1 or 2 lines near the error. your error is on line 95. so unindent line 95, 96, 97, and 94, 93. that's it.
Also, another way is to comment the error part, and write that part again.
Indent and unindent everything by pressing on mac
cmd-a
(select everything) thentab
(to indent) and thenshift-tab
(to unindent). On windows, doctrl-a
,tab
, andshift-tab
.Then it should work! :D