• Python question of the day

    What would be the output of executing the following code:
    list(range(5, 0, -1))
     [5, 4, 3, 2, 1]
     [5, 4, 3, 2, 1, 0]
     [5]
     [1, 2, 3, 4, 5]
    Explanation:
    Sequences returned by range always include the starting value given as an argument to range and never include the ending value given as an argument.


    Top 100 python interview questions:






datai analytics