Answer to Question #305007 in Python for Sai

Question #305007

Given list sorting array and same frequency



Input:



[2 6 3 1 8 12 2 9 10 3 4]



Output:



[1 2 2 3 3 4 6 8 9 10 12]



2 3

1
Expert's answer
2022-03-02T14:10:03-0500
A = [2, 6, 3, 1, 8, 12, 2, 9, 10, 3, 4]
B = list(set(A))
x = []
for r in range(0,len(B)):
    for c in range(0,A.count(B[r])):
        x.append(B[r])
print(x)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS