Python if the equal condition | Example code
Python Comparison equal is used to compare the values on either side of them and decide the relation among them. If the equal condition is… Read More »Python if the equal condition | Example code
python
Python Comparison equal is used to compare the values on either side of them and decide the relation among them. If the equal condition is… Read More »Python if the equal condition | Example code
The list can Iterate backward in Python if read the last element first and then the last but one and so on till the element… Read More »Iterate backward Python | Example code
Use the in operator to search for a substring in Python. 99% of use cases will be covered using the keyword, in, which returns True… Read More »Python search for a substring | Example code
Using the String modulo operator(%), you can easily format numbers (integer) and print in python. Example Python print format integer The string modulo operator (… Read More »Python print integer format | Example code
Simply pass the tuple into the print function to print tuple values. It will print the exact tuple but if you want to print it… Read More »Python print tuple values | Example code
Use Python built-in capitalize() method to capitalize the first letter of a sentence and change the rest of the characters into lowercase. This method is… Read More »Python capitalize the first letter of a sentence | Example code
Use title() to capitalize the first letter of every word in a string in python. Python Str class provides a member function title() which makes… Read More »Python capitalize the first letter of every word in a string | Example code
Use the equality (‘==’) operator to check if strings are equal or not. It will work case-sensitive manner i.e. uppercase letters and lowercase letters would… Read More »Python if string equals | Example code
Python if-else one line can be used as a ternary operator. There is the conditional expression. but this is an expression, not a statement. Example… Read More »Python if else one line | Example code
An str.startswith method allows supplying a tuple of strings to test for Searching if a string starts with a string that is contained in a… Read More »Python startswith list | Example code