tsuji.tech
  • Blog
  • TIL
  • About
  • |
LIGHT DARK
  • Home
  • /
  • TIL
  • /
  • Google Colab

Use Python Variables in Shell Commands in Google Colab

Feb 3, 2025
Table of Contents
  • Use Python Variables in Shell Commands in Google Colab

Use Python Variables in Shell Commands in Google Colab

file_path = '/content/sample.txt'
!echo "Hello, World!" > {file_path}
!cat {file_path}
 
About / Disclaimer / Privacy Policy / Sitemap / Contact /
© 2024-2025 K. Tsuji