This question maybe is meaningless. We always create a list by only one line,like
Onelist = [ _ for _ in range(5)]
to create a list 0-4
.
If I want to create a dictionary Result
:
CountList = ["zero","one","two","three","four","five","six","seven","eight","nine"]
Result = {
"zero":0,
"one":0,
# each value is zero
xxxxx
}
Is there a pythonic way to do this?