This module converts the python source file into .pyc file:

2023

This module converts the python source file into .pyc file:

Answer: D. py_compileThe 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…

  1. A.

    py_source

  2. B.

    py_run

  3. C.

    py_interpreter

  4. D.

    py_compile

Attempted by 1234 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 फाइल्स में संकलित करने के लिए उपयोग किया जाता है। यह कोड को निष्पादित नहीं करता है बल्कि स्रोत फाइल का संकलित संस्करण बनाता है।

Explore the full course: Hpsc Pgt Computer Science

Loading lesson…