Question:
I want to save the data in a csv file in a specific format but I am getting an error. The desired output is attached.
Answer:
So TypeError: ‘int’ object is not iterable error occured because int object doesn’t have this function.
Make x variable to list type then it works.
If you have better answer, please add a comment about this, thank you!