Contact: aviboots(AT)netvision.net.il
39,961 questions
51,903 answers
573 users
import math lst = [4, 16, 10] sqr = [] for n in lst: sqr.append(math.sqrt(n)) print(sqr) ''' run: [2.0, 4.0, 3.1622776601683795] '''
import numpy as np lst = [4, 16, 10] print(np.sqrt(lst)) ''' run: [2. 4. 3.16227766] '''