Advertisement
Guest User

Untitled

a guest
Jan 28th, 2020
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. #first
  2. '''s = input()
  3. words = s.split(' ')
  4. capitalized_words = []
  5. for word in words:
  6. cap_word = word[0].upper() + word[1:]
  7. capitalized_words.append(cap_word)
  8. output = ' '.join(capitalized_words)
  9. print(output)'''
  10.  
  11. #second
  12. '''s = input()
  13. symbols = {}
  14. for i in s:
  15. if i in symbols:
  16. symbols[i] += 1
  17. else:
  18. symbols[i] = 1
  19. print(symbols)'''
  20.  
  21. #third
  22. '''s = input()
  23. if len(s) > 1:
  24. s_out = s[:2] + s[-2:]
  25. else:
  26. s_out = "Empty String"
  27. print(s_out)'''
  28.  
  29. #fourth
  30. '''strings = []
  31. s = input()
  32. while s != " ":
  33. strings.append(s)
  34. s = input()
  35. count = 0
  36. for str in strings:
  37. if len(str) >= 2 and str[:1] == str[-1:]:
  38. count += 1
  39. print(count)'''
  40.  
  41. #fifth
  42. #set.issuperset(other) или set >= other
  43. '''s = input()
  44. set1 = set(s)
  45. s = input()
  46. set2 = set(s)
  47. s = input()
  48. set3 = set(s)
  49. print(set1.issuperset(set3) and set2.issuperset(set3))'''
  50.  
  51. #sixth
  52. '''n = int(input())
  53. dict = {a: a ** 2 for a in range(1, n + 1)}
  54. print(dict)'''
  55.  
  56. #seventh
  57. '''dict1 = {a: a ** 2 for a in range(1, 7)}
  58. dict2 = {a: a ** 3 for a in range(1, 5)}
  59. dict = dict1.copy()
  60. dict.update(dict2)
  61. print(dict)'''
  62.  
  63. #eighth
  64. '''from collections import Counter
  65. dict = {a: a ** 2 for a in range(1, 7)}
  66. k = Counter(dict)
  67. high = k.most_common(3)
  68. print(high)'''
  69.  
  70.  
  71. #ninth
  72. '''input = [1, 1, 2, 3, 3, [4, 5, 6]]
  73. output = []
  74. for x in input:
  75. if x not in output:
  76. output.append(x)
  77. print(output)'''
  78.  
  79. #tenth
  80. '''list1 = [1, 1, 2, 3, 3, [4, 5, 6]]
  81. list2 = [3, 5]
  82. output = []
  83. for x in list1:
  84. if x not in list2:
  85. output.append(x)
  86. print(output)'''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement