• Python question of the day

    What is the difference between datetime.now( ) and datetime.today( ) methods?
    from datetime import datetime
    print(datetime.today())
    print(datetime.now())
     datetime.today( ) can take an argument, tz
     datetime.now( ) can take an argument, tz
     datetime.today( ) has more precision
     datetime.now( ) gives UTC time not local time
    Explanation:


    Top 100 python interview questions:


  • python bootcamp 2021
datai analytics