Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- def reverse(word):
- return word[::-1]
- while True:
- a = (sys.argv[1])
- if a.count('"') == 2:
- print reverse(a.strip('"'))
- elif a.count(' ')>0:
- print "Wrong amount of parameters!"
- sys.exit()
- elif a == '':
- print "Wrong amount of parameters!"
- sys.exit()
- else:
- print reverse(a.strip('"'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement