What do you someone breaks something? I post the solution here...

Kubernetes (K8s/K3d) / Terraform / Ansible / Linux / AWS / Docker / Bash / Python / ELK / CI/CD / Java / Traefik / Nginx / CentOs / Ubuntu





Multi-line Comments are actually not available in Python

Multi line comments are not available in Python, the triple double quotes and triple single quotes are not actually comments but they are regular strings with an exception that they can span multiple lines , that means memory will be allocated  to these strings internally. if these are not assigned to any variable, then they are removed from memory by garbage collector, and hence these these can be used as comments
 So using multi line comments are not recommended for comments since they internally occupy memory and would waste PVM time since it has to check them and interpret

As we all know comments are ignored compile time but these multi line strings so called comments are compiled and loaded in memory.

Hope this post might help
Thanks
Shailesh Thakur
 
 

No comments:

Powered by Blogger.