
page 1 out of 4
page 1 out of 4
Question 1
Question 2
from collections import deque str="" a=['h','a','n','n'] d=deque(a) d.appendleft('s') d.append('u') d.popleft() d.pop() d.pop() print(str.join(d))
Question 3
from collections import Counter l=[1,2,2,3,6,7,6,8,6,9,6,1,7,1,2,1,9,1] c=Counter(l) print(c.most_common())
Question 4
Question 5
Question 6
Question 7
from collections import defaultdict d = defaultdict(int) d['kotlin'] = 1 d['python'] = 2 print(d['java'])
Question 8
Question 9
Question 10
from collections import Counter myList = [1,1,2,3,4,5,3,2,3,4,2,1,2,3] print Counter(myList).items()
page 1 out of 4
page 1 out of 4
Oops!!
To view the solution need to Login