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 rid

21st Jun 2022, 6:54 PM
Thomas Walker
3 Answers
+ 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.
21st Jun 2022, 6:58 PM
Justice
Justice - avatar
+ 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?
22nd Jun 2022, 3:38 AM
Emerson Prado
Emerson Prado - avatar
+ 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.
21st Jun 2022, 8:12 PM
Lothar
Lothar - avatar