Skip to content

Why does this Traceback error come up in Python?

I am writing something that merges a PDF (in a Supplement folder) with many PDFs (in an Input folder) then saves them into an Output folder. This seems to work once taking the first PDF in the Input folder, merging it with the PDF in the Supplement folder, and saving it into the Output folder without issue. B…

Python: Setting the X and Y vectors of a bullet

I need to calculate the vector_x and vector_y of a bullet, fired from x1, y1. The target is at x2, y2. vector_x describes the number of units the bullet travels in the x direction per second. vector_y describes the same, just with the y direction. I tried many different versions of the same function, but I wa…

.strip() on array using for loop in Python not working?

I’m trying to get rid of blankspace before and after an element in an array using .strip(), How do i get this to work correctly, I currently have : my output which is nearly right, but still has a space before the second element is: Answer I believe you are stripping before splitting. You want to split …