Python Taskbook Level 6.7

Задание 1

Make a function that will take a text with words as a parameter and return a text in which these words will be sorted in alphabetical order.

Задание 2

Create a function that takes two lists as parameters and returns a list of their common elements.

Задание 3

Make a function that will return a random number. The function should not return the same number twice in a row.

Задание 4

Make a function that takes a list and an element as a parameter and returns the next element. See the example:

pythonlst = [1, 2, 3, 4, 5];

func(lst, 1); // 2
func(lst, 4); // 5
func(lst, 5); // 1