This module converts the python source file into .pyc file:
2023
This module converts the python source file into .pyc file:
- A.
py_source
- B.
py_run
- C.
py_interpreter
- D.
py_compile
Attempted by 1093 students.
Show answer & explanation
Correct answer: D
The correct module that converts a Python source file (.py) into a compiled bytecode file (.pyc) is py_compile. This module is part of Python's standard library and is used to compile Python scripts into .pyc files for faster execution. It does not execute the code but creates a compiled version of the source file.
हिन्दी उत्तर: पायथन स्रोत फाइल (.py) को संकलित बाइटकोड फाइल (.pyc) में बदलने वाला सही मॉड्यूल py_compile है। यह पायथन की मानक लाइब्रेरी का एक हिस्सा है और पायथन स्क्रिप्ट्स को .pyc फाइल्स में संकलित करने के लिए उपयोग किया जाता है। यह कोड को निष्पादित नहीं करता है बल्कि स्रोत फाइल का संकलित संस्करण बनाता है।