0

How to split string into list in python? ??

I used .split command but it's not working

31st Jan 2017, 1:17 AM
Akshay
Akshay - avatar
4 odpowiedzi
+ 2
string="Car Boat Bike Taxi" list=string.split() print(list)
31st Jan 2017, 2:38 AM
LordHill
LordHill - avatar
+ 1
x = "hey" myList = list() for i in x: myList.append(i) print(myList) # output is ['h','e','y']
31st Jan 2017, 2:20 AM
Kawaii
Kawaii - avatar
0
Thank u
31st Jan 2017, 2:21 AM
Akshay
Akshay - avatar
0
a=['a'.......'z'] b=['p','l'i=j=0 while j <2 if a [i]=b [j] k=0 while k <26 b [j]=a [i+k ] print (b[j]) k=k+1 i=i+1 j=j+1 shift cipher code... I should get output as ok. ...where am I doing It wrong
31st Jan 2017, 2:32 AM
Akshay
Akshay - avatar