• Python question of the day

    What is the output of
    1.0 // 2
     0
     0.0
     0.5
     1

    Explanation:
    In python, performs the integer division (does not consider anything after decimal point), by only considering the integer part of the division, even for floating-point numbers. Performing this operation on unsupported types (like lists and strings), will result in a TypeError.


    Top 100 python interview questions:






datai analytics