I cloned a github repo using !git clone https://github.com/llSourcell/Pokemon_GAN.git. I wanted to modify a .py file inside Colab. So i used %load fil
!git clone https://github.com/llSourcell/Pokemon_GAN.git
%load fil
Solution:
p = """ Yadda yadda whatever you want just don't use triple quotes. """ c = """text_file = open("text.text", "w+");text_file.write(p);text_file.close()""" exec(c)