kyu_7.fun_with_lists_length package

Submodules

kyu_7.fun_with_lists_length.length module

Solution for -> Fun with lists: length.

Created by Egor Kostan. GitHub: https://github.com/ikostan

kyu_7.fun_with_lists_length.length.length(head) int[source]

Length function.

The method length, which accepts a linked list (head), and returns the length of the list. :param head: :return:

kyu_7.fun_with_lists_length.node module

Node class for -> Fun with lists: length.

Created by Egor Kostan. GitHub: https://github.com/ikostan

class kyu_7.fun_with_lists_length.node.Node(data, n_next=None)[source]

Bases: object

The linked list.

property data

Get data.

Returns:

property next

Get next.

Returns:

kyu_7.fun_with_lists_length.test_length module

Test for -> Fun with lists: length.

Created by Egor Kostan. GitHub: https://github.com/ikostan

class kyu_7.fun_with_lists_length.test_length.LengthTestCase(methodName='runTest')[source]

Bases: TestCase

Testing length function.

_classSetupFailed = False
_class_cleanups = []
test_length()[source]

Testing length function.

The method length, which accepts a linked list (head), and returns the length of the list. :return:

test_length_none()[source]

Testing length function where head = None.

The method length, which accepts a linked list (head), and returns the length of the list. :return:

Module contents

Fun with lists: length.