answersLogoWhite

0

How do you import time on python?

Updated: 10/19/2022
User Avatar

Wiki User

7y ago

Best Answer

Use the datetime module. To get the hours you would do datetime.hour or you could just type datetime

User Avatar

Wiki User

7y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you import time on python?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you import random in python 3.2?

import random random.randrange(1, 99999) #Set range from 1 to 99999


How do you import math functions in python?

At the top of your program: import math or from math import * The second one imports all math functions, like fact() for factorial.


How do you make a random number using Python?

this is the code for making a random number using python: import random >>>random.randint (1, 10) you can do whatever numbers you want.


How do you draw HELLO WORLD in python?

There are a couple of ways: 1. Use turtle. It is a module that can be imported. 2. The print function 3. Use tkinter. It is a module in python that you can import.


How do you use pyparallel?

sudo apt-get install python-parallel sudo rmmod lp log out sudo modprobe ppdev python import parallel prPrt = parallel.Parallel() prPrt.setData(0x01)


When was Monty Python's Complete Waste of Time created?

Monty Python's Complete Waste of Time was created in 1994.


When did Monty Python's Complete Waste of Time happen?

Monty Python's Complete Waste of Time happened in 1994.


What would i use to import data stored on a website?

To import data stored on a website, you can use web scraping techniques or libraries in programming languages like Python. Popular tools for web scraping include BeautifulSoup and Scrapy in Python. These libraries allow you to extract data from web pages by navigating the HTML structure and retrieving the desired information.


How do you do multiple modules within a program on python?

Save each module with a .py extension, then import them into whichever modules require them, including the main module.


Where can one find tutorials on how to create Python time programs?

Python is a high level interactive, object-oriented programming language. If one requires a tutorial to create Python time programs there is a full tutorial available on the Tutorials Point website.


How long was Michael palin in Monty Python for?

The whole time.


Is a ball python a good pet?

Yes, a ball python is considered to be a good pet. The ball python can be kept in a glass aquarium and sometimes even let loose in the home for small periods of time.