Python uzdevumu krājums 9.4. līmenis

Задание 1

Dots kāds URL:

python$url = 'http://test.com/dir1/dir2/dir3/page.html';

Iegūstiet no tā secīgu mapju kopu:

python[
  '/dir1/dir2/dir3/',
  '/dir2/dir3/',
  '/dir3/'
]
Задание 2

Dots patvaļīgs divdimensiju saraksts:

python[
  [11, 12, 13, 14, 15],
  [21, 22, 23, 24, 25],
  [31, 32, 33, 34, 35],
  [41, 42, 43, 44, 45],
  [51, 52, 53, 54, 55],
]

Iegūstiet tā sānu diagonāles elementu sarakstu:

python[
  15, 24, 33, 42, 51
]