Skip to content

How to execute a cmd command in Python?

CMD /K - execute a command then remain

import os
os.system('cmd /k "Your Command Prompt Command"')
See also  How to add an item to a list in Python?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.