Create a Random Password Generator in Python
Learning how to create a password generator can be the perfect project to learn or review basic Python concepts.
Learn to Code. Shape Your Future
Learning how to create a password generator can be the perfect project to learn or review basic Python concepts.
If you are getting familiar with Python classes you might have heard the term instance method. What are instance methods? How can you use them? Instance methods are the default methods defined in Python classes. They are called instance methods because they can access instances of a class (objects). Two ways to use instance methods … Read more
Does Python have private methods in the same way other programming languages do? In this Python tutorial, we will answer this question. In Python, you can define a private method by prefixing the method name with a single underscore. Differently from other programming languages making a method private in Python doesn’t prevent you from accessing … Read more
Have you ever asked yourself why when you create a Python Flask application you pass __name__ to the Flask class? I definitely did when I started working with Flask and in this tutorial, I want to make it clear to those of you who would like to know more about it. The variable __name__ is … Read more
Are you wondering how to find the minimum and maximum values in a Python dictionary? Here you will find the answers you are looking for. The easiest way to find the minimum or maximum values in a Python dictionary is to use the min() or max() built-in functions applied to the list returned by the … Read more
Do you have to sort a list of tuples in your Python program? Are you trying to figure out if you should use sorted() or sort()? You are in the right place. The first way to sort a list of tuples is by using the Python sorted() function that returns a new sorted list of … Read more
Knowing how to split a Python string is a skill to learn as a Python developer. Let’s see how you can split strings in multiple ways. The Python string data type provides the split() method that allows to split a string into a list of strings. You can split a string by using the space … Read more
The error “unexpected EOF while parsing” occurs when the interpreter reaches the end of a Python file before every code block is complete. This can happen, for example, if any of the following is not present: the body of a loop (for / while), the code inside an if else statement, or the body of … Read more
Have you ever seen the TypeError object is not callable when running one of your Python programs? We will find out together why it occurs. The TypeError object is not callable is raised by the Python interpreter when an object that is not callable gets called using parentheses. This can occur, for example, if by … Read more
Have you ever heard about the list comprehension in Python? It simplifies the way you work with lists and it makes your code more concise. The list comprehension is a Python construct that reduces the lines of code required to generate a new list or to filter an existing list. A list comprehension is enclosed … Read more