+ 1
Create list with regular expressions
How do you create a list with the regular expressions of the elements in another list?
4 ответов
+ 4
So you need to use re.compile() method:
https://pymotw.com/2/re/#compiling-expressions
+ 2
It sound like you're confusing between "regular expression" and "list comprehension" ^^
Do a google search about "python list comprehension" to get many explanations about them, among which:
https://www.programiz.com/python-programming/list-comprehension
0
@visph
I'm trying to create a program with Tkinter that opens different apps.
In order to do that I need to have the path to the app that will be opened.
This path can't be a simple string. It needs to have the r before the path.
Something like this: r"C:\\Program Files\\..."
I have a list of the paths for each app.
Now I would like to create a list with the same paths but with the r before each string.
My problem is I can't put the r out of the "".
0
More on Python List...
http://net-informations.com/python/ds/lists.htm