- Home
- /
- TIL
- /
- Google Colab
Use Python Variables in Shell Commands in Google Colab
Table of Contents
Use Python Variables in Shell Commands in Google Colab
file_path = '/content/sample.txt'
!echo "Hello, World!" > {file_path}
!cat {file_path}
file_path = '/content/sample.txt'
!echo "Hello, World!" > {file_path}
!cat {file_path}