Skip to content

Instantly share code, notes, and snippets.

@Mayank-1234-cmd
Created March 29, 2021 16:26
Show Gist options
  • Save Mayank-1234-cmd/bcad5060de8d9ccf978ceb8a0898c374 to your computer and use it in GitHub Desktop.
Save Mayank-1234-cmd/bcad5060de8d9ccf978ceb8a0898c374 to your computer and use it in GitHub Desktop.
os.system but returns str output
import os
def os_system(cmd):
z=str(os.system(cmd))
return z.replace("u'","",1).replace("'","",z.count("'"))
os_system("echo hi")
@Mayank-1234-cmd
Copy link
Author

broken

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