Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- input_string = input().split('/')
- new_list = []
- for i in input_string:
- x = i.count('=')
- if x == 2:
- new_list.append(i)
- elif x == i.count('='):
- if x == 0:
- new_list.append(i)
- new_list1 = []
- for leather in new_list:
- if '=' in leather:
- a = leather.replace('=','')
- new_list1.append(a)
- elif '=' not in leather:
- a = leather
- new_list1.append(a)
- word_list = []
- for word in new_list1:
- if word.isalpha() and len(word) > 3 and str(word[0]).isupper():
- word_list.append(word)
- result = ', '.join(word_list)
- total_sum = sum(len(word_list)for word_list in word_list)
- print(f'Destinations: {result}')
- print(f'Travel Points: {total_sum}')
Advertisement
Add Comment
Please, Sign In to add comment