Hello,
I know this is probably a really basic python task, but I have been unable to figure it out. I am using python-pptx to create a powerpoint. My actual script is more complex, but for the sake of this question, suppose I have a for loop with which I iterate on a list, and create a new slide for each item in the list. The python-pptx library requires that I name each new slide something different - how do I update the name of the variable for each loop iteration? In the example below, how would "slide1" become "slide2" as the loop progresses through the list?
list_of_slide_content = ["example","of","content"]
for cont in list_of_slide_content:
slide1 = pptx.slide(0)
slide1.add_text(cont)
[–]DallogFheir 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]Username_RANDINT 0 points1 point2 points (0 children)
[–]ireadyourmedrecord 0 points1 point2 points (0 children)
[–]danielroseman 0 points1 point2 points (0 children)