Skip to content

Executing file with Program arguments  #3

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

importsyssys.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?.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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