how to print the current time using python?

0 votes
Unable to print the current time. which module is used in python to get the current time and date?
Apr 17, 2018 in Python by ana1504.k
• 7,870 points
56 views

2 answers to this question.

0 votes
import datetime

print(datetime.datetime.today())
answered Apr 17, 2018 by Johnathon
• 9,080 points
0 votes
print(datetime.datetime.today())
answered Feb 14 by Shashank
• 1,350 points

Related Questions In Python

0 votes
3 answers

How to get the current time in Python

FOLLOWING WAY TO FIND CURRENT TIME IN ...READ MORE

answered Apr 8 in Python by rajesh
• 1,210 points
78 views
0 votes
1 answer

How to get the current time in Python

>>> import datetime >>> datetime.datetime.now() datetime(2018, 25, ...READ MORE

answered Jul 25, 2018 in Python by Frankie
• 9,810 points
52 views
0 votes
2 answers

How to add a certain time delay to the code using Python?

You can use time.sleep(duration in second) READ MORE

answered Feb 14 in Python by Shashank
• 1,350 points
38 views
0 votes
1 answer

How to get the return value from a thread using python?

You don't need to change your existing ...READ MORE

answered Dec 3, 2018 in Python by Nymeria
• 3,520 points

edited Dec 19, 2018 by Nymeria 13,798 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 330 views
0 votes
2 answers

Unable to use print statement in python3

print will work when you use print("Your ...READ MORE

answered Feb 14 in Python by Shashank
• 1,350 points
40 views
0 votes
1 answer

what are "and" and "or" operators in Python?

AND - True if both the operands ...READ MORE

answered Apr 17, 2018 in Python by Johnathon
• 9,080 points
47 views