Skip to content

Instantly share code, notes, and snippets.

"""
Write a function called shift_left. The function accepts a list of 3 lengths and returns a new list one step to the left.
>>> shift_left([0, 1, 2])
[1, 2, 0]
>>> shift_left(['monkey', 2.0, 1])
"""
The function gets a list of strings of equal length. The function returns a string containing the list organs in paired positions,
violated in the Warford comma, as well as the last limb with the caption and before.
"""
The function accepts two lists list_y, list_x. The function extends list_x (modifies it) so that at the beginning
it also contains list_y, and returns list_x.
"""
The function receives two lists containing organs of the type int and float alone.
The function returns true if both lists contain exactly those people (even if in different order),
otherwise the function returns false.
"""
The function receives a list consisting of strings and returns the longest string.
"""
The function receives two integers, start and stop (suppose it exists: start <= stop).
The function returns a list where all the number squares are between start and stop (inclusive).
Instructions
Use the while loop only.
"""
The function accepts two parameters: list and number n.
The function returns a new list containing all organs larger than the number n.
"""
The function accepts as a string parameter.
The function returns a list in which the first organ represents the number of digits in the string,
and the second organ represents the number of letters in the string, including spaces, points,
""" The function gets an integer, end_number.
The function returns a list within the numbers 0 through the end_number,
with some numbers being replaced by a boom string if they meet one of the following conditions:
1. The number is double the number 7.
2. The number contains the digit 7."""
EXMP:
print(seven_boom(17))
"""
The function gets a string and deletes the letters that appear in sequence. That is,
the function returns a string containing only one character from each sequence of identical characters in the input string.
>>> sequence_del("ppyyyyythhhhhooonnnnn")
'python'
>>> sequence_del("SSSSsssshhhh")