Why are arrays important? For example: suppose that you would need to plot or access elements that were declared or calculated inside a for-loop. However, you need to access only the second element outside the for-loop.
#!/usr/plocal/bin/python3 import numpy as np for i in range(0,1000,1): t = i print("the second element of t is: ")to do that and using what we learned in this example. We can simply fill the array and access the second element as so:
#!/usr/plocal/bin/python3 import numpy as np t = np.arange(0,1000,1) print(t)