Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #first
- '''s = input()
- words = s.split(' ')
- capitalized_words = []
- for word in words:
- cap_word = word[0].upper() + word[1:]
- capitalized_words.append(cap_word)
- output = ' '.join(capitalized_words)
- print(output)'''
- #second
- '''s = input()
- symbols = {}
- for i in s:
- if i in symbols:
- symbols[i] += 1
- else:
- symbols[i] = 1
- print(symbols)'''
- #third
- '''s = input()
- if len(s) > 1:
- s_out = s[:2] + s[-2:]
- else:
- s_out = "Empty String"
- print(s_out)'''
- #fourth
- '''strings = []
- s = input()
- while s != " ":
- strings.append(s)
- s = input()
- count = 0
- for str in strings:
- if len(str) >= 2 and str[:1] == str[-1:]:
- count += 1
- print(count)'''
- #fifth
- #set.issuperset(other) или set >= other
- '''s = input()
- set1 = set(s)
- s = input()
- set2 = set(s)
- s = input()
- set3 = set(s)
- print(set1.issuperset(set3) and set2.issuperset(set3))'''
- #sixth
- '''n = int(input())
- dict = {a: a ** 2 for a in range(1, n + 1)}
- print(dict)'''
- #seventh
- '''dict1 = {a: a ** 2 for a in range(1, 7)}
- dict2 = {a: a ** 3 for a in range(1, 5)}
- dict = dict1.copy()
- dict.update(dict2)
- print(dict)'''
- #eighth
- '''from collections import Counter
- dict = {a: a ** 2 for a in range(1, 7)}
- k = Counter(dict)
- high = k.most_common(3)
- print(high)'''
- #ninth
- '''input = [1, 1, 2, 3, 3, [4, 5, 6]]
- output = []
- for x in input:
- if x not in output:
- output.append(x)
- print(output)'''
- #tenth
- '''list1 = [1, 1, 2, 3, 3, [4, 5, 6]]
- list2 = [3, 5]
- output = []
- for x in list1:
- if x not in list2:
- output.append(x)
- print(output)'''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement