There is list of mac addresses create list of commands to delete this

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
1. There is a list of mac addresses - create a list of commands to delete this mac
[aabbcc, a1b1c1] -> [curl -X DELETE https://marina.ring.com/aabbcc, curl -X DELETE https://marina.ring.com/a1b1c1]
2. There is a string, for each letter return the position of last occurrence.
abracadabra -> {'a': 10, 'b': 8, 'r': 9, 'c': 4, 'd': 6}
# тут я розбила ‘abracadabra’ на ліст елементів:
s = "abracadabra"
list(s)
print(list(s))
#і знайшла, як з знайти останнє згадування, але лише по окремому елементу:
result = s.rfind('a')
print("'a':", result)
#як всім списком не тямлю.
2.*There is a list of integers, create a dict with count of each element (have a look at defaultdict)
[1, 2, 4, 6, 2, 7, 1, 2, 1, 2, 2] -> {1: 3, 2:5, 4:1, 6:1, 7:1}
4. There is a list of integers, return only those elements that can be divided by position index (add 0s)
[0, 3, 3, 6, 12, 7, 4, 21] -> [0, 3, 6,12, 21]