Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def sub(str):
- #@ param str: string
- str0=''
- for ch in str:
- if ch in str0 and ch !=' ':
- str0=str0+'*'
- else:
- str0=str0+ch
- return str0
- def palindroma(str):
- #@ param str: string
- i=0
- while i<=(len(str)/2):
- if not str[i]==str[(len(str)-1)-i]:
- return False
- i=i+1
- return True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement