

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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 Questions & Answers
- Create a tuple from string and list in Python
- Python program to convert a list of strings with a delimiter to a list of tuple
- 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?
- How to remove empty strings from a list of strings in Python?
- How to create a comma separated string from a list of string in C#?
- 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?
- Create a list of tuples from given list having number and its cube in each tuple using Python
- Program to create a lexically minimal string from two strings in python
- Python How to sort a list of strings
Advertisements