How do we make python scripts executable?
Answer / chaitanya
Python scripts can be executed in two ways:
Suppose I want to execute script1.py
We can open the script1.py in IDE editor & run the script in the frontmost window of the python IDE by hitting the run all button.
Second way is using command prompt by making sure PATH is set appropriately directly type script name else type
>>>python script1.py
Is This Answer Correct ? | 0 Yes | 0 No |
How to remove whitespaces from a string in python?
What is the difference between repr and str in python?
Can we override a constructor?
Name a few methods for matching and searching the occurrences of a pattern in a given text string?
How can you pick a random item from a list or tuple in python?
Explain important characteristics of python objects?
Explain Inheritance in Python?
How does python handle memory management?
Why python is popular nowadays?
How do you sort a list in reverse order in python?
Tell me what are the built-in type does python provides?
What are all the operating system that python can run on?