0
Python Help, Password Validator, HOW TO GET RID OF EXTRA LINE IN ANSWER
password = input() symbolRating = 0 numRating = 0 for x in password: if x == "!" or x == "@" or x == "#" or x == "
quot; or x == "%" or x == "*" or x == "&": symbolRating = symbolRating + 1 for x in password: if x == "0" or x == "1" or x == "2" or x == "3" or x == "4" or x == "5" or x == "6" or x =="7" or x == "8" or x == "9": numRating = numRating + 1 if numRating >= 2 and symbolRating >= 2: print("Strong") else: print("Weak") My answer is same as the right, yet mine has an extra line, how to get rid3 ответов
+ 2
Please note that it's very hard to debug a wall of text with no indentation. If you can, please link your code from the Code Playground.
Also, you can try using the strip method.
+ 2
Pls save your code in Code Playground as public and edit your question, including a link to the code, using "+" button.
Where exactly is the extra line?
+ 1
Thomas Walker ,
i can not understand what you mean by saying that you get an extra line.
if this is a code coach exercise, please mention the tutorial name, the lesson name or number.