Functions are very useful in the Python computer programming language as they help the coder to group utilities together with the main purpose of accomplishing a specific goal. Not only this, but the function can also help the Python coder to stop repeating themselves in their Python based projects. Continue reading “How to pass *args in a Python function”
How to print the elements of a list object in Python
The Python list object is very useful to the coder, especially when they have to store data and keep track of it in their projects. Not only can the coder make use of the list object to store data in it, but they can also make use of the data by using different utilities which the Python computer programming language offers by default.
Continue reading “How to print the elements of a list object in Python”
How to check if a Python string starts with a specific character
Been writing for some time a side project in the Python computer programming language, there was a case when I had to check if a string object started with a specific character or not. Then based on the status of the condition, I had to make sure to run different branches of the project’s code.
The good thing is that the Python computer programming language is so rich in features, that almost anything can be accomplished by making use of builtin utilities. According to my personal experience with the Python scripting language, the string object has a specific builtin method which can be used to check if it starts with a specific character or not. Continue reading “How to check if a Python string starts with a specific character”
How to get the current working directory with Python
One can easily find out the current working directory by making use of the Python computer programming language, since it comes with all the utilities required to interact with the functionalities of the operating system.
Before going any further with this tutorial, make sure to launch a new Python interactive console on your own operating system.
Continue reading “How to get the current working directory with Python”
How to create a dictionary in Python and make use of it
There are many builtin objects offered by the Python computer programming language which the Python coder can make use of while writing their Python based applications. Through this simple and short tutorial, you are going to learn how to create a dictionary object and how to make use of it in a practical case, in a real word scenario.
Continue reading “How to create a dictionary in Python and make use of it”
How to change the current working directory with Python
There are times when you have to process information being stored in different directories through your Python based applications. Being rich in features, the Python computer programming language comes with all the utilities one needs to interact with the functionalities provided by the operating system. Continue reading “How to change the current working directory with Python”
How to create a new directory with Python
Being rich in features, Python provides all kinds of utilities required to interact with the functionalities offered by the operating system. The Python coder can easily access and unlock the functionalities offered by his or her operating system through the usage of the builtin os module. Continue reading “How to create a new directory with Python”