Self-documenting variable names make comment unnecessary (#163)

pull/173/head
Christian Clauss 2021-04-12 18:15:46 +02:00 committed by GitHub
parent 2a8185f159
commit 488eec39ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 10 deletions

View File

@ -22,13 +22,9 @@ def is_palindrome(s: str):
# main program
if __name__ == "__main__":
# string 1
s1 = "abba"
# string 2
s2 = "abbcccbba"
# string 3
s3 = "abbccbbba"
# call is_palindrome (internally calls palindrome) for each string
is_palindrome(s1)
is_palindrome(s2)
is_palindrome(s3)
string_1 = "abba"
string_2 = "abbcccbba"
string_3 = "abbccbbba"
is_palindrome(string_1)
is_palindrome(string_2)
is_palindrome(string_3)