Category Python Programming

Python is one of the most widely used programming languages. It’s getting a lot of popularity these days because of so many Python frameworks in IoT, Machine Learning, Deep Learning, and Artificial Intelligent space.

These Python Tutorials will help you in getting mastery over the Python Programming. The tips and tricks shared by us will enable you to write pythonic code with high performance, reusability, readability, and maintainability.

How to Reverse a List in Python

How to Reverse a List in Python

Putting a Python list in the opposite order can mean changing the list itself or making a reversed copy. The reverse() method changes the list in place, while a slice with a step of -1 gives you a reversed copy…

How to Get a Substring in Python

How to Get a Substring in Python

`”banana”.find(“pear”)` returns `-1` when the text is absent. I’m fascinated that a failed search has a clear result, while `-1` can still act as a valid slice position. You can separate the idea of a text fragment from the operation…

Python replace() function

Python replace() function

Calling `”Python python PYTHON”.replace(“python”, “Ruby”)` changes only the lowercase match. I appreciate the `count` argument because it caps how many matches change. Pass the old and new text to `str.replace()` and check the returned string. Compare that returned string with…