Created
February 6, 2020 14:44
-
-
Save andriiburka/aae4c107da9171b920a112c630172e82 to your computer and use it in GitHub Desktop.
Comprehension ver.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def foo_palindromic_check(str_in): | |
for number in str_in: | |
is_palindromic = [number[i - 1] for i in range(1, int(len(number) / 2) + 1)] ==\ | |
[number[-i2] for i2 in range(1, int(len(number) / 2) + 1)] | |
print(is_palindromic) | |
string_in = input().split(', ') | |
foo_palindromic_check(string_in) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment