Public · Protected · Private
Python array
Type: Public  |  Created: 2024-12-21  |  Frozen: Yes
« Previous Public Blog Next Public Blog »
Comments
  • i#Array of strings tem_list = ['Bread', 'Milk', 'Eggs', 'Butter', 'Cocoa'] # Array of numbers student_marks = [78, 47, 96, 55, 34] ##array of any hetero_list = [ 1,2,3.0, 'text', True, 3+2j ]
  • student_marks = [78, 47, 96, 55, 34] for i in range(len(student_marks)): student_marks[i]+=5 print(student_marks)
  • #Used to calculate total operation list1 = list(range(1,1000000)) list2 = list(range(2,1000001)) list3 = [] for i in range(len(list1)): list3.append(list1[i]+list2[i])
  • #Importing Numpy import numpy as np #Creating a numpy array of 1 million numbers a = np.arange(1,1000000) b = np.arange(2,1000001) c = a+b
This blog is frozen. No new comments or edits allowed.