Self-documenting variable names make comment unnecessary (#163)
parent
2a8185f159
commit
488eec39ef
|
@ -22,13 +22,9 @@ def is_palindrome(s: str):
|
||||||
|
|
||||||
# main program
|
# main program
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# string 1
|
string_1 = "abba"
|
||||||
s1 = "abba"
|
string_2 = "abbcccbba"
|
||||||
# string 2
|
string_3 = "abbccbbba"
|
||||||
s2 = "abbcccbba"
|
is_palindrome(string_1)
|
||||||
# string 3
|
is_palindrome(string_2)
|
||||||
s3 = "abbccbbba"
|
is_palindrome(string_3)
|
||||||
# call is_palindrome (internally calls palindrome) for each string
|
|
||||||
is_palindrome(s1)
|
|
||||||
is_palindrome(s2)
|
|
||||||
is_palindrome(s3)
|
|
||||||
|
|
Loading…
Reference in New Issue