Contact: aviboots(AT)netvision.net.il
39,885 questions
51,811 answers
573 users
s = "3.14, 7.82, 2.43, 1.67, 4.32, 5.89" lst = [float(i) for i in s.split(', ')] print(lst) ''' run: [3.14, 7.82, 2.43, 1.67, 4.32, 5.89] '''
s = "3.14, 7.82, 2.43, 1.67, 4.32, 5.89" lst = list(map(float, s.split(', '))) print(lst) ''' run: [3.14, 7.82, 2.43, 1.67, 4.32, 5.89] '''