summaryrefslogtreecommitdiff
path: root/python/palindroma.py
blob: 6c3a7e9e3465b2ab94fb882d102d95ce2b1528d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# def palindromo(parola, start, end):
#     if start >= end:
#         return True
#     elif parola[start] == parola[end]:
#         return palindromo(parola, start+1 , end-1)
#     else:
#         return False
#
#
# parola = input('Parola: ')
#
# if palindromo(parola, 0, len(parola)-1):
#     print('Palindroma')
# else:
#     print('Non palindroma')

parola = raw_input('Parola: ')

if parola == parola[::-1]:
    print('Palindroma')
else:
    print('Non palindroma')