# -*- coding: utf-8 -*- """ Created on Sat Sep 20 15:39:27 2020# @author: Jake Bobowski """ # Created using Spyder(Python 3.7) # Lists # Lists are created using square brackets. L1 = [1, 2, 5, 12] L2 = [6, 7] # You can merge the two lists using the addition notation. print(L1 + L2) # If you're using arrays made from the 'NumPy' module, merging, or concatenating # two arrays is a little different. import numpy as np A1 = np.array(L1) A2 = np.array(L2) A3 = np.concatenate((A1, A2)) print(A3) # You can also build matrices from arrays (assuming the arrays have the same length) A1 = np.array([1, 2, 3, 4]) A2 = np.array([-5, -6, -7, -8]) M1 = np.matrix([A1, A2]) print(M1) # The matrix can then be transposed: M2 = np.transpose(M1) print(M2)