Python Taskbook Level 8.1

Задание 1

Given some URL:

pythonurl = 'http://test.com/dir1/dir2/dir3/page.html';

Get the domain name from it:

python'test.com';
Задание 2

Given a list:

python[
  [1, 2, 3],
  [1, 2],
  [1, 2, 3, 4, 5],
  [1],
  [1, 2, 3, 4],
]

Sort the list items in ascending order of the number of items in the sublist.

Задание 3

Given a list:

python[
  [2, 4, 5],
  [1, 2, 3],
  [0, 1, 1],
  [5, 7, 1],
]

Sort the list elements in ascending order of the sum of the sublist elements.

Задание 4

Display the following pyramid on the screen:

x
xx
xxx
xxxx
xxxxx