Lists from lists
In python 3, is there a way to take a large list of numbers, and then create a new list based on the frequency of each number from greatest to least?
This is great! This is easier than what I was trying to do for the first part. But is there a way to use the dictionary outputs as new retrievable inputs based on their count value?
assign it to a variable and access with the target key eg: https://code.sololearn.com/c8VA9EcmGe2R/?ref=app
Counter can take a list and return the frequency of each element as a dictionary EG... from collections import Counter as ctr list = [2, 3, 5, 6, 2, "g", 2, 5, "g"] print(ctr(list))
Problem Statement Given two integers a and b, your task is to calculate and print the following four values:
Please help, any idea?
Loop question, I've tried everything that I knew I just don't know. Please help me solve it out
Help me wiht python