“Argc Python” Code-Antworten

Übergeben Sie das Argument an eine PY -Datei

import sys

def hello(a,b):
    print "hello and that's your sum:", a + b

if __name__ == "__main__":
    a = int(sys.argv[1])
    b = int(sys.argv[2])
    hello(a, b)
# If you type : py main.py 1 5
# It should give you "hello and that's your sum:6"
Impossible Iguana

Argc Python

len(sys.argv)
Crazy Crossbill

Ähnliche Antworten wie “Argc Python”

Fragen ähnlich wie “Argc Python”

Weitere verwandte Antworten zu “Argc Python” auf Python

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen