I am trying to make the following statement more flexible:
for posting in page.findAll(attrs = {"id": re.compile(r'''post\d+''')}):
The following part is retrieved dynamically from a CSV file and stored in a string (for example the string called test). The CSV is stored in a secure location, accessible for admins only.
attrs = {"id": re.compile(r'''post\d+''')}
Can I integrate the variable as following by using an eval(test) or exec(test) in stead of just test?
for posting in page.findAll(test)):