Unable to take pictures with multiple cameras

No
In your first program it was

from cv2 import *
print("Defining cameras")
cam1 = VideoCapture(0)
print("Camera 1(0) defined")
cam2 = VideoCapture(1)
print("Camera 2(1) defined")

0 was 0K and not 1

Now you have to try

from cv2 import *
print("Defining cameras")
cam1 = VideoCapture(1)
print("Camera 1 (1)defined")
cam2 = VideoCapture(0)
print("Camera 2(0) defined")

1 must be OK and 0 should be out (of course if 1 and 0 are similar)