Skip to content

Ertugrul's Notebook

  • About
  • Contact
  • English
  • Türkçe

Tag: python

The Pitfalls of Using Mutable Default Arguments in Python

2023-09-062023-09-06

In Python, it can be convenient to define functions with default values. These are used when a value is not explicitly provided when the function is called: However, unexpected behavior can arise when using mutable objects, such as lists, as default values: You might expect that the players list would be empty each time this […]

Posted in Programming, PythonTagged best practice, programming, python

How to install Python to Debian/Ubuntu

2023-06-202023-06-20

Installing the Python version supported by your Debian or Ubuntu operating system is fairly straightforward. Use the following commands: Note: The above commands will install the default Python3 version that comes with your specific Debian or Ubuntu version. To install a more recent Python version on your Debian or Ubuntu system, you can use the […]

Posted in ProgrammingTagged debian, how to, install, Linux, python, Ubuntu

Exception Handling in Python

2023-05-282023-05-30

Exception handling is an integral part of coding in any language, and Python is no exception. However, one common mistake that developers often make is to catch all exceptions to avoid crashes. While this might seem like a good strategy to keep your program running, it can actually mask real issues and lead to hard-to-diagnose […]

Posted in Programming, PythonTagged best practice, coding, exception handling, programming, python, tips

Search

My apps

  • Masterlist
  • Lydian
  • Flashcards
  • Break the Code
  • Sayibul
© 2025 Ertugrul's Notebook • Slightly Theme