Python tutorials

Quiz: Dictionaries in Python

Interactive Quiz ⋅ 14 QuestionsBy Leodanis Pozo Ramos Share In this quiz, you’ll test your understanding of Dictionaries in Python. By working through this quiz, you’ll revisit how to create dictionaries using literals and the dict() constructor, how to use Python’s operators and built-in functions to manipulate them, and how they’re implemented as a hash map for fast key lookups. The quiz contains 14 questions and there is no time limit. You’ll get 1 point for each correct answer. At […]

Read more

Quiz: Python’s Instance, Class, and Static Methods Demystified

Interactive Quiz ⋅ 6 QuestionsBy Martin Breuss Share In this quiz, you’ll test your understanding of Instance, Class, and Static Methods in Python. By working through this quiz, you’ll revisit the differences between these methods and how to use them effectively in your Python code. The quiz contains 6 questions and there is no time limit. You’ll get 1 point for each correct answer. At the end of the quiz, you’ll receive a total score. The maximum score is 100%. […]

Read more

Quiz: Python Set Comprehensions: How and When to Use Them

Interactive Quiz ⋅ 5 QuestionsBy Leodanis Pozo Ramos Share In this quiz, you’ll test your understanding of Python Set Comprehensions: How and When to Use Them. Set comprehensions are a concise and quick way to create, transform, and filter sets in Python. They can significantly enhance your code’s conciseness and readability compared to using regular for loops to process your sets. The quiz contains 5 questions and there is no time limit. You’ll get 1 point for each correct answer. […]

Read more

Quiz: GitHub Actions for Python

Interactive Quiz ⋅ 9 QuestionsBy Bartosz Zaczyński Share In this quiz, you’ll test your understanding of Continuous Integration and Deployment for Python With GitHub Actions. By working through this quiz, you’ll revisit how to use GitHub Actions and workflows to automate linting, testing, and deployment of a Python project. You’ll also review how to secure your credentials and automate security and dependency updates. The quiz contains 9 questions and there is no time limit. You’ll get 1 point for each […]

Read more

Introducing DuckDB

To use DuckDB, you first need to install it. Fortunately, DuckDB is self-contained, meaning it won’t interfere with your existing Python environment. You use python -m pip install duckdb to install it from the command prompt. If you’re working in a Jupyter Notebook, the command becomes !python -m pip install duckdb. The supporting downloadable code for this tutorial is also presented in a Jupyter Notebook. Once the installation is complete, you can quickly test your installation with a query: To […]

Read more

What Can You Do With Python?

You’ve finished a course or finally made it to the end of a book that teaches you the basics of programming with Python. You’ve learned about variables, lists, tuples, dictionaries, for and while loops, conditional statements, object-oriented concepts, and more. So, what’s next? What can you do with Python nowadays? Python is a versatile programming language with many use cases in a variety of different fields. If you’ve grasped the basics of Python and are itching to build something with […]

Read more

Quiz: Python Code Quality: Best Practices and Tools

Interactive Quiz ⋅ 13 QuestionsBy Leodanis Pozo Ramos Share In this quiz, you’ll test your understanding of Python Code Quality: Tools & Best Practices. By working through this quiz, you’ll revisit the importance of producing high-quality Python code that’s functional, readable, maintainable, efficient, and secure. You’ll also review how to use tools such as linters, formatters, and profilers to help achieve these qualities. The quiz contains 13 questions and there is no time limit. You’ll get 1 point for each […]

Read more

Python Code Quality: Best Practices and Tools

Producing high-quality Python code involves using appropriate tools and consistently applying best practices. High-quality code is functional, readable, maintainable, efficient, and secure. It adheres to established standards and has excellent documentation. You can achieve these qualities by following best practices such as descriptive naming, consistent coding style, modular design, and robust error handling. To help you with all this, you can use tools such as linters, formatters, and profilers. Read on to learn more about the strategies, tools, and best […]

Read more

Quiz: How to Strip Characters From a Python String

Interactive Quiz ⋅ 8 QuestionsBy Martin Breuss Share In this quiz, you’ll test your understanding of Python’s .strip() method. You’ll also revisit the related methods .lstrip() and .rstrip(), as well as .removeprefix() and .removesuffix(). These methods are useful for tasks like cleaning user input, standardizing filenames, and preparing data for storage. The quiz contains 8 questions and there is no time limit. You’ll get 1 point for each correct answer. At the end of the quiz, you’ll receive a total […]

Read more

Quiz: Python’s Bytearray

Interactive Quiz ⋅ 11 QuestionsBy Bartosz Zaczyński Share In this quiz, you’ll test your understanding of Python’s Bytearray: A Mutable Sequence of Bytes. By working through this quiz, you’ll revisit the key concepts and uses of bytearray in Python. The quiz contains 11 questions and there is no time limit. You’ll get 1 point for each correct answer. At the end of the quiz, you’ll receive a total score. The maximum score is 100%. Good luck! Related Resources

Read more
1 2 3 188