Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Strings Have Length | Strings
Python Data Types
course content

Course Content

Python Data Types

Python Data Types

1. Numeric Types
2. Boolean Type
3. Strings

Strings Have Length

There is also a very useful function in Python that can give the length of a string -- len() function. Let's look at the example of using this function.

Task

You have such strings apple,grape, orange. You have to get the length of each of these strings. Using such comparison operators >, < determine the longest string.

Task

You have such strings apple,grape, orange. You have to get the length of each of these strings. Using such comparison operators >, < determine the longest string.

Everything was clear?

Section 3. Chapter 8
toggle bottom row

Strings Have Length

There is also a very useful function in Python that can give the length of a string -- len() function. Let's look at the example of using this function.

Task

You have such strings apple,grape, orange. You have to get the length of each of these strings. Using such comparison operators >, < determine the longest string.

Task

You have such strings apple,grape, orange. You have to get the length of each of these strings. Using such comparison operators >, < determine the longest string.

Everything was clear?

Section 3. Chapter 8
toggle bottom row

Strings Have Length

There is also a very useful function in Python that can give the length of a string -- len() function. Let's look at the example of using this function.

Task

You have such strings apple,grape, orange. You have to get the length of each of these strings. Using such comparison operators >, < determine the longest string.

Task

You have such strings apple,grape, orange. You have to get the length of each of these strings. Using such comparison operators >, < determine the longest string.

Everything was clear?

There is also a very useful function in Python that can give the length of a string -- len() function. Let's look at the example of using this function.

Task

You have such strings apple,grape, orange. You have to get the length of each of these strings. Using such comparison operators >, < determine the longest string.

Section 3. Chapter 8
Switch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt