Disclaimer: I am a beginner in python but have Drupal programming experience.
I have this:
f = [1.jpg, 2.jpg, 3.jpg] #unknown amount at runtime
and I need to do this
call(['c:/program files/ABBYY FineReader 10/finereader.exe',f])
BUT instead of simply ending the call with f, it should do this
call(['c:/program files/ABBYY FineReader 10/finereader.exe', 1.jpg,2.jpg,3.jpg])
How can I unpack f? Is unpacking the right approach?
Would this work? By performing
+on two lists, you get a new list back that is the concatenation of the first list with the second.You can also append further arguments to the list in-place with the
extend()method: