Solution 1

language = "Python"
name = "Guido Van Rossum"

string_template = "{name} is the creator of {language}"
text = string_template.format(name=name, language=language)

length_of_language = len(language)
length_of_name = len(name)
length_of_text = len(text)

String Length

Use the len function to check the length of the strings defined in the editor.

Test Cases

test length of language - Run Test

def test_length_of_language():
    assert length_of_language == 6

test length of text - Run Test

def test_length_of_text():
    assert length_of_text == 41

test length of name - Run Test

def test_length_of_name():
    assert length_of_name == 16
language = "Python" name = "Guido Van Rossum" string_template = "{name} is the creator of {language}" text = string_template.format(name=name, language=language) length_of_language = len(language) length_of_name = ? length_of_text = ?