Comments are used to enhance readability and understandability of source code by providing proper information about the code. Comments are not … [Read more...] about How to create multiline comments in Python
Comment out a block of code in Python
There may be many situations while testing or debugging python programs where we want a certain statement in the code or a block of statements in the … [Read more...] about Comment out a block of code in Python
User Defined Exceptions in Python
When we write programs in python for real life applications, there are many constraints on the values which the variables can take in the program. For … [Read more...] about User Defined Exceptions in Python
How to remove punctuation from a Python String
Often during data analysis tasks, we come across text data which needs to be processed so that useful information can be derived from the data. During … [Read more...] about How to remove punctuation from a Python String
How to split string variables in Python
There may be many situations where we may need to split string variables. To split string variables in python we can use split() method, rsplit() … [Read more...] about How to split string variables in Python
String Splicing in Python
Python strings are sequences of characters enclosed in single, double or triple quotes. Strings are immutable in python. We can access each character … [Read more...] about String Splicing in Python
What is a good comment/code ratio?
A comment is a piece of code that isn’t executed by the compiler or interpreter when the program is executed. Comments can only be read when we have … [Read more...] about What is a good comment/code ratio?