﻿ Python: Listify the list of given strings individually using map function - w3resource # Python: Listify the list of given strings individually using map function

## Python map: Exercise-3 with Solution

Write a Python program to listify the list of given strings individually using Python map.

Sample Solution:

Python Code :

``````color = ['Red', 'Blue', 'Black', 'White', 'Pink']
print("Original list: ")
print(color)
print("\nAfter listify the list of strings are:")
result = list(map(list, color))
print(result)
``````

Sample Output:

```Original list:
['Red', 'Blue', 'Black', 'White', 'Pink']

After listify the list of strings are:
[['R', 'e', 'd'], ['B', 'l', 'u', 'e'], ['B', 'l', 'a', 'c', 'k'], ['W', 'h', 'i', 't', 'e'], ['P', 'i', 'n', 'k']]
```

Python Code Editor:

Have another way to solve this solution? Contribute your code (and comments) through Disqus.

What is the difficulty level of this exercise?

Test your Programming skills with w3resource's quiz.

﻿

## Python: Tips of the Day

Clamps num within the inclusive range specified by the boundary values x and y:

Example:

```def tips_clamp_num(num,x,y):
return max(min(num, max(x, y)), min(x, y))
print(tips_clamp_num(2, 4, 6))
print(tips_clamp_num(1, -1, -6))
```

Output:

```4
-1
```