Python remove single quotes from a string | (‘)

You can remove single quotes from a string in python using replace the function or translate function, Regular Expressions, etc. A easiest way is just replace the apostrophe character with an empty string: msg = “Hell’o” print(msg.replace(“‘”, “”)) Way to remove single quotes from a string in Python replace() function translate() function Regular Expressions Other Read More…


While true Python | while loop is bad? Break Out

Python While True creates an infinite loop and in other languages that use while The base structure of that loop in Python: Python while loop is a conditional statement that runs as long as an expression evaluates to true. If while loop expression always evaluates to true. Therefore, the while loop will run every time. Example It Read More…


Python pass statement | Example with loop, function & class

Python pass statement is a null operation. Means nothing will happen on its execution. The interpreter does not ignore a pass statement. So Nothing will happen when the pass is executed and the result results in no operation. It can use in condition statements where you can’t leave an empty block. But why you have to use Read More…


Python Statements and Syntax – Symbols & Special Characters

Every programming language has different Statements and Syntax. But most programming languages have almost the same. Python also has Statements and Syntax, and that is common in a programming language but you must have known about it. Statement are some rules and certain symbols are used in program(code). Let’s see the list of symbol and Read More…


Python Join Function | Join Strings

Python Join is a Sting function (method) and it returns a string, where the elements of the sequence have been joined by a string separator. So you to choose a separate as stings like comma, hash, space or other separators. The best way to describe it is when you have two separate strings and want Read More…


Python Split() Function | Split String Example

The Python split() function breaks up a string at the specified separator (space, comma, etc) and returns a list of Strings. You can do it with use the python inbuilt split function. In this tutorial, you will learn, how to split a string by space, character, delimiter, comma into a list and Python split string and Read More…


Python Regex (Regular Expression or RE) | Operations

Regular expressions  (REs, or regexes, or regex patterns) are used to identify whether a pattern exists in a given sequence of strings or not. For example validation of Email, phone number, and passwords, etc. Python Regex is basic a tiny, highly specialized programming language embedded inside Python, which is available through the re module. The regular expressions are extremely Read More…



Python Import Module (Library/Package/File) System

The Python Import is statements are similar to the #include statements in C/C++ but different. It allows you to use functions defined elsewhere either in a standard module or package or your own modules. In this tutorial, you will learn about Python Import statements in detail with examples. If you know some of the imported manners in another Read More…


Python Arrays Declaration | Methods | Examples

Python Arrays are sequence types, it’s similar to Lists, but the type of objects stored in the Arrays is constrained. Arrays are kind of variables a hold more than one value within the same variable and organized with indexing, where indexing starts with 0. In this tutorial, you will learn about Python Arrays and it’s examples with Read More…