in one of my assignment i was tasked to do this:
1 >>> d = {1: 'one', 2: 'two', 3: 'three', 4: 'four', 5: 5}
2 >>> print ________
3 ['one', 'two', 'three', 'four']
how to only use one line of code in line 2 of the code above without importing any other functions to get the ouput ['one', 'two', 'three', 'four']
in line 3?
i can only print out all the values of the dictionary without excluding the last element using print(list(d.values()))
and my result is ['one', 'two', 'three', 'four', 5]