+ 8

How can I do this in python lists? See desc

We are given a list ['hi', 'bye'] how can I make it this: [['h', 'i'], ['b', 'y', 'e']] I Need Help...

28th Jun 2018, 11:30 AM
ᏳoƊoԲᎮc !
ᏳoƊoԲᎮc ! - avatar
4 Respuestas
28th Jun 2018, 11:37 AM
Ulisses Cruz
Ulisses Cruz - avatar
+ 7
Thanks D'lite I will try 😊
28th Jun 2018, 11:50 AM
ᏳoƊoԲᎮc !
ᏳoƊoԲᎮc ! - avatar
+ 6
Ulisses Cruz Thanks man it worked 😊
28th Jun 2018, 11:39 AM
ᏳoƊoԲᎮc !
ᏳoƊoԲᎮc ! - avatar
+ 2
You could also use this :: words=["hi","bye"] hi=words[0] bye=words[1] words=[] Hi=[] Bye=[] for letter in hi: Hi.append(letter) for letter in bye: Bye.append(letter) words=[Hi,Bye] print(words)
28th Jun 2018, 11:47 AM
Dlite
Dlite - avatar