W3Tutorials.net
Toggle Menu
Home
Online Go Compiler
Tutorials
Javascript Tutorials
Python Tutorials
Go Tutorials
Blog
All Posts
Python Standard Library
Explore common Python modules like os,sys,and datetime.
1. Which module in the Python Standard Library is used for working with JSON data?
yaml
json
pickle
csv
2. Which method of datetime.datetime returns the current local date and time?
now()
today()
current()
get_time()
3. Which module provides tools for interacting with the operating system?
sys
os
io
platform
4. What is the primary purpose of the 'sys' module?
System time management
Access to interpreter variables and functions
File system navigation
Network communication
5. Which module includes the 'Counter' class for counting hashable objects?
math
collections
itertools
functools
6. Which modules are part of the Python Standard Library? (Select all that apply)
requests
json
numpy
os
pandas
7. Which functions/modules can read from standard input? (Select all that apply)
sys.stdin.read()
input()
os.read()
fileinput.input()
readline()
8. Which are numeric modules in the Standard Library? (Select all that apply)
math
random
statistics
decimal
pygame
9. Which data structures are in the 'collections' module? (Select all that apply)
deque
defaultdict
namedtuple
Counter
Stack
10. The 'math' module includes a 'factorial' function to compute the factorial of a number.
True
False
11. random.randint(a, b) returns a random integer between a and b, inclusive of both endpoints.
True
False
12. The 'requests' module is part of the Python Standard Library.
True
False
13. What module is used for working with regular expressions? (full name)
14. Name the module for parsing command-line arguments (full name).
15. What module serializes Python objects to/from byte streams? (full name)
Reset
Answered 0 of 0 — 0 correct