I'm trying to print every element in the second text file for each element in the first text file. When running the nested for loop, it's only printing every element from the second text file with the first element from the first text file.
Code:
colors = open("colorsList.txt", "r")
cars = open("carsList.txt", "r")
for color in colors:
for car in cars:
print(color + car)
colors.close()
cars.close()
An example is trying to print: bluemustang, bluecamaro, bluetacoma, red mustang, redcamaro, redtacoma, etc.
Edit:
The files contain every possible color and car in text files. I'm basically trying to concatenate every element in the car list with every element in the color list.