Post image
Light Mode
Dark Mode
Python in Action: LLMs, Regex, and Clean Code

Hello, checkiomates🐱‍👤!

In this edition, explore the evolving role of large language models (LLMs) in 2024, master the art of regular expressions in Python, and revisit the essentials of writing clean, PEP 8-compliant code. Finally, put your Python skills to the test with a mission to calculate a championship table, sharpening your data-handling abilities.

💡TIP

At your profile, after clicking on big percent number of your progress, you may see module and methods you have already used in your shared solutions.
If you want to discover all CheckiO features, visit our tutorial. It's a longread, but it's worth it!

🏁MISSION

Championship Table by freeman_lex -

Joana found an old booklet in the trophy room of the football club she supports, containing the results of all the championships the team has participated in. Each entry in the booklet gives five details of a championship: number of Games, Points, Wins (3 point/win), Draws (1 point/draw) and Losses. Some (one or two) of the numbers are illegible (-1), but they can be calculated using the legible numbers. Help Joana complete the information in the booklet.

results((10, 20, 6, 2, -1)) == (10, 20, 6, 2, 2)
results((-1, 64, 18, 10, 10)) == (38, 64, 18, 10, 10)
results((-1, 47, 14, -1, 9)) == (28, 47, 14, 5, 9)

📖ARTICLES

Things we learned about LLMs in 2024 -

A lot has happened in the world of Large Language Models over the course of 2024. Here’s a review of things we figured out about the field in the past twelve months, plus author's attempt at identifying key themes and pivotal moments.

How to Use Regular Expressions in Python -

Regular expressions, commonly known as regex, are a tool for text processing and pattern matching. In Python, the re module offers a robust implementation of regex, allowing developers to handle complex text manipulation efficiently. In this article, we'll get to grips with regular expressions and provide practical code examples — from the basic to more advanced — so you can understand how to use regex in Python.

How to Write Beautiful Python Code With PEP 8 -

PEP 8, sometimes spelled PEP8 or PEP-8, is the official style guide for Python code. PEP 8 gives guidelines on naming conventions, code layout, and other best practices. Guido van Rossum, Barry Warsaw, and Alyssa Coghlan wrote it in 2001 with a focus on enhancing code readability and consistency. By adhering to PEP 8, you ensure that your Python code is readable and maintainable, which helps with collaboration and professional development.

👩‍💻CODE SHOT

How do you think, what the following code does?

import itertools

?????????????? = lambda a: [sum(group) for key, group in itertools.groupby(a)]

🙌 Thanks for your attention! Hope to meet you at CheckiO, as well as at our Instagram and Twitter! We are really interested in your thoughts! Please, leave a comment below! ⤵

Created: Feb. 3, 2025, 6:14 p.m.
0
40
User avatar
freeman_lex