Python: Find the available built-in modules
Python Basic: Exercise-78 with Solution
Write a Python program to find the available built-in modules.
Sample Solution:-
import sys
import textwrap
module_name = ', '.join(sorted(sys.builtin_module_names))
print(textwrap.fill(module_name, width=70))
========= RESTART: F:/Python_APSC/py-ex-basic-78.py =============
_ast, _bisect, _codecs, _codecs_cn, _codecs_hk, _codecs_iso2022,
_codecs_jp, _codecs_kr, _codecs_tw, _collections, _csv, _datetime,
_functools, _heapq, _imp, _io, _json, _locale, _lsprof, _md5,
_multibytecodec, _opcode, _operator, _pickle, _random, _sha1, _sha256,
_sha512, _signal, _sre, _stat, _string, _struct, _symtable, _thread,
_tracemalloc, _warnings, _weakref, _winapi, array, atexit, audioop,
binascii, builtins, cmath, errno, faulthandler, gc, itertools,
marshal, math, mmap, msvcrt, nt, parser, sys, time, winreg, xxsubtype,
zipimport, zlib
>>>
沒有留言:
張貼留言