[Python] Run a python code from terminal with arguments

Discussão em 'Python' iniciado por Stack, Junho 7, 2025.

  1. Stack

    Stack Membro Participativo

    With what python code can an argument be recognized as a string?[​IMG]

    for example:
    "root:/user1/Folder1# python -W ignore run1.py Pustaka Sarawak
    Govt"
    In the above example, file 'run1.py' takes the argument "Pustaka Sarawak" recognizes it as a string and outputs "Govt" after performing a process. What is the code to recognize "Pustaka Sarawak" as a string? In the picture takes the Polis Diraja Malaysia and the output is 'Govt'

    Continue reading...

Compartilhe esta Página