Skip to content

Executing file with Program arguments  #3

@guyluz11

Description

@guyluz11

In python (like all programming languages) there is an option to execute the code while giving the program some input from outside.

In python you can access the arguments like this

import sys

sys.argv[0]
sys.argv[1]
sys.argv[2]

I know that running from the command line I can pass the values like this

python fileName.py test 553 6

How can I pass arguments using python shell?.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions