Skip to content

Commit c7a31df

Browse files
committed
Added functionaliy for int
1 parent 58c79c3 commit c7a31df

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

problems/palindrome/palindrome.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
def is_palindrome(s):
2+
s = str(s)
23
rev = s[::-1]
34
if s == rev:
45
return True
56
return False
67

78

89
if __name__ == '__main__':
9-
inputs = ['orange', 'minim']
10+
inputs = ['orange', 'minim', 12321]
1011
for i in inputs:
1112
print(f'{i} is a palindrome:{is_palindrome(i)}')

0 commit comments

Comments
 (0)