Skip to content

Tag: python-3.x

Python script for ‘ps aux’ command

I have tried to use subprocess.check_output() for getting the ps aux command using python but it looks like not working with the large grep string. Can anyone have any solution? Answer Yes, I have found the solution to achieve the output, We can use the following code snippet to find the PID as output. Instea…

python – Weight for weight from CodeWars

The code works, but at the same time it outputs a string in which the same value can be reversed. Therefore, it gives an error in tests Here is the code itself: enter image description here Answer Find it’s harder to follow your logic, but this will be my simple approach: Please read and compare with yo…