• Thursday pleasure routine: fresh Missions and useful Topics!

Hello, checkiomates🐱‍👤! And so we met again)

Time goes fast, it's a new Thursday and a bunch of fresh missions and topics to read! As usual you are welcome to discuss them in comments.

Ready. Steady. Go..to solve 🏁 NEW MISSIONS:

One Switch Strings by Doppelok - where you are given two strings and need to determine whether you can swap two letters in the first string to get the second string. If so - return True, if not - False. For example, the string "btry", if we swap y and t, we get "byrt".

switch_strings("btry", "byrt") == True
switch_strings("boss", "boss") == True
switch_strings("solid", "disel") == False

Adjacent Letters by freeman_lex - You are given a string, where all letters are of same case. This string could include adjacent letters - two the same letters together ("aa", "bb" etc). Your task in this mission is to remove both these letters. If after removing one pair a new appears - remove it as well! Each such pair should be removed from string until no one remains.

adjacent_letters("adjacent_letters") == "adjacent_lrs"
adjacent_letters("") == ""
adjacent_letters("aaa") == "a"

Sort Sorted Groups by freeman_lex - You are given a list of integers. Your goal is to find all sorted groups (group of numbers with distinct sorting order or single value) inside the list, sort input list by these groups and return this sorted list with groups unpacked. For example, [5, 1, 5, 0, 5] --> [[5, 1], [5, 0], [5]] --> [[5], [5, 0], [5, 1]] --> [5, 5, 0, 5, 1]. If adjacent numbers are equal, consider sorting order remains the same. If a group starts with equal numbers, seek the different number further to determine or check sorting order, or end of the list.

sorted_groups([]) == []
sorted_groups([5]) == [5]
sorted_groups([5, 1, 5, 0, 5]) == [5, 5, 0, 5, 1]

💡Take a break from solving and read something interesting and useful. Here are LINKS for your attention!

5 techniques to Idiomatic Python (Loops) - In this post, you'll see 5 ways you can make your python loops more idiomatic and Pythonic, run faster and more memory efficient.

I know Python basics, what's next? - Programmers often wonder what to do after learning the basics. It is not an easy question actually! But here are some resources that might help you take the next step in your Python learning journey.

Why if __name__ == "__main__" is needed in your script?! - This video shows you what _name_ == "__main__" is and why it's useful.

🙌 See ya somewhere in CheckiO universe! 🌌

Welcome to CheckiO - games for coders where you can improve your codings skills.

The main idea behind these games is to give you the opportunity to learn by exchanging experience with the rest of the community. Every day we are trying to find interesting solutions for you to help you become a better coder.

Join the Game