Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

~10.6K People Reached
Favorite Forums
Member Avatar for Malinka

Hello Everyone, I have a list of digits. What is the most efficient way to count the number of tokens between two known digits? Here is what I came up with: [CODE] def dis(l, a1, a2): i1 = l.index(a1) i2 = l.index(a2) distance = i2 - i1 - 1 return …

Member Avatar for TrustyTony
0
120
Member Avatar for Malinka

Hello everybody! I have to go through each subfolder and extract matching strings from each of the files (File_1, File_2, File_3, File_4, etc.). Unfortunately, I don't know how to do that under Linux. I have the following structure: MainFolder: ---Subfolder A ------File_1 ------File_2 ------File_3 ---Subfolder B ------File_4 ------File_5 ------File_6 ---Etc. …

Member Avatar for Gribouillis
0
9K
Member Avatar for Malinka

Dear Community, hopefully someone can explain this to me in simple terms: I would like to store raw input from a User without waiting for him to press Enter. And would it be possible to still check if the response is one of the predefined options? My raw input consists …

Member Avatar for Malinka
0
2K
Member Avatar for Malinka

Dear all, may be someone can help me to find a solution to the following problem: I have a list of patterns (len=5) that are presented as tuples in a list, e.g. patterns = [('w1','X1','w1','Y1','w1'), ('w2','w2','X2','w2','Y2'), ('w2','X2','w2','Y2','w2')] I want to go through all sentences in a text file (one sentence …

Member Avatar for Malinka
0
97