Given a Tuple. The task is to convert it to List by adding the given string after every element.

**Examples:**

Input: test_tup = (5, 6, 7), K = "Gfg"Output: [5, 'Gfg', 6, 'Gfg', 7, 'Gfg']Explanation: Added "Gfg" as succeeding element.Input: test_tup = (5, 6), K = "Gfg"Output: [5, 'Gfg', 6, 'Gfg']Explanation: Added "Gfg" as succeeding element.

**Method #1: Using list comprehension**

In this, we construct a tuple of each element of tuple with a succeeding element and then run a nested loop to flatten each constructed tuple using list comprehension.

## Python3

`# Python3 code to demonstrate working of ` `# Convert tuple to List with succeeding element ` `# Using list comprehension ` ` ` `# initializing tuple ` `test_tup ` `=` `(` `5` `, ` `6` `, ` `7` `, ` `4` `, ` `9` `) ` ` ` `# printing original tuple ` `print` `(` `"The original tuple is : "` `, test_tup) ` ` ` `# initializing K ` `K ` `=` `"Gfg"` ` ` `# list comprehension for nested loop for flatten ` `res ` `=` `[ele ` `for` `sub ` `in` `test_tup ` `for` `ele ` `in` `(sub, K)] ` ` ` `# printing result ` `print` `(` `"Converted Tuple with K : "` `, res) ` |

*chevron_right*

*filter_none*

**Output:**

The original tuple is : (5, 6, 7, 4, 9)

Converted Tuple with K : [5, ‘Gfg’, 6, ‘Gfg’, 7, ‘Gfg’, 4, ‘Gfg’, 9, ‘Gfg’]

**Method #2 : Using chain.from_iterable() + list() + generator expression**

This is similar to above method, difference is that nested loop is avoided by flattenning using chain.from_iterable().

## Python3

`# Python3 code to demonstrate working of ` `# Convert tuple to List with succeeding element ` `# Using chain.from_iterable() + list() + generator expression ` `from` `itertools ` `import` `chain ` ` ` `# initializing tuple ` `test_tup ` `=` `(` `5` `, ` `6` `, ` `7` `, ` `4` `, ` `9` `) ` ` ` `# printing original tuple ` `print` `(` `"The original tuple is : "` `, test_tup) ` ` ` `# initializing K ` `K ` `=` `"Gfg"` ` ` `# list comprehension for nested loop for flatten ` `res ` `=` `list` `(chain.from_iterable((ele, K) ` `for` `ele ` `in` `test_tup)) ` ` ` `# printing result ` `print` `(` `"Converted Tuple with K : "` `, res) ` |

*chevron_right*

*filter_none*

**Output:**

The original tuple is : (5, 6, 7, 4, 9)

Converted Tuple with K : [5, ‘Gfg’, 6, ‘Gfg’, 7, ‘Gfg’, 4, ‘Gfg’, 9, ‘Gfg’]

## Recommended Posts:

- Python | Sort tuple list by Nth element of tuple
- Python - Extract Kth element of every Nth tuple in List
- Python | Replace tuple according to Nth tuple element
- Python | Adding N to Kth tuple element
- Python - Flatten tuple of List to tuple
- Python - Convert Tuple Matrix to Tuple List
- Python - Adding Tuple to List and vice - versa
- Python - Convert Tuple String to Integer Tuple
- Python | Merge list of tuple into list by joining the strings
- Python program to create a list of tuples from given list having number and its cube in each tuple
- Python - Raise elements of tuple as power to another tuple
- Python - Convert Tuple to Tuple Pair
- Python | Insert after every Nth element in a list
- Python program to convert a list of strings with a delimiter to a list of tuple
- Python | Convert a list into a tuple
- Python | Convert a list into tuple of lists
- Python | Categorize tuple values into dictionary value list
- Python | Convert list of tuple into dictionary
- Python | Group tuple into list based on value
- Python | Convert mixed data types tuple list to string list

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.