
- Python Basic Tutorial
- Python - Home
- Python - Overview
- Python - Environment Setup
- Python - Basic Syntax
- Python - Comments
- Python - Variables
- Python - Data Types
- Python - Operators
- Python - Decision Making
- Python - Loops
- Python - Numbers
- Python - Strings
- Python - Lists
- Python - Tuples
- Python - Dictionary
- Python - Date & Time
- Python - Functions
- Python - Modules
- Python - Files I/O
- Python - Exceptions
How to create a tuple from a string and a list of strings in Python?
The built-in function tuple() converts a Python string into tuple of individual characters. It also turns a list object into a tuple.
>>> tuple("TutorialsPoint") ('T', 'u', 't', 'o', 'r', 'i', 'a', 'l', 's', 'P', 'o', 'i', 'n', 't') >>> L1=[45, 32, 100, 10, 24, 56] >>> tuple(L1) (45, 32, 100, 10, 24, 56)
- Related Articles
- Create a tuple from string and list in Python
- Python – To convert a list of strings with a delimiter to a list of tuple
- How can I create a Python tuple of Unicode strings?
- Python program to convert a list of strings with a delimiter to a list of tuple
- How to remove empty strings from a list of strings in Python?
- Program to create a lexically minimal string from two strings in python
- How to create a comma separated string from a list of string in C#?
- Create a list of tuples from given list having number and its cube in each tuple using Python
- Create Ennead Tuple from a List collection in Java
- Create Decade Tuple from a List collection in Java
- Create LabelValue Tuple from a List collection in Java
- Create Octet Tuple from a List collection in Java
- Create KeyValue Tuple from a List collection in Java
- How to cast a list of strings to a string array?
- Python program to create a list of tuples from the given list having the number and its cube in each tuple

Advertisements