Skip to content

Instantly share code, notes, and snippets.

@trojblue
Created June 27, 2023 02:50
Show Gist options
  • Save trojblue/03f446824a85a92aebcf5a14798c93be to your computer and use it in GitHub Desktop.
Save trojblue/03f446824a85a92aebcf5a14798c93be to your computer and use it in GitHub Desktop.
common python debug commands

save to txt:

my_list =  responses[56]

with open('my_file2.txt', 'w', encoding="utf-8") as f:
    for item in my_list:
        f.write("%s\n" % item)

save to clipboard:

import pyperclip
my_string = messages[0]
pyperclip.copy(my_string)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment