How can I split a text into tuple ? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

How can I split a text into tuple ?

When you split a text it outputs objects of that string inside a list a = "solo learn".split(" ") a >>> ['solo','learn'] I want to it to output like this ('solo','learn')

16th Nov 2020, 8:02 PM
omar_ctr
omar_ctr - avatar
1 Réponse
+ 7
a = tuple("Solo Learn".split())
16th Nov 2020, 8:07 PM
ChaoticDawg
ChaoticDawg - avatar