User Profile

Collapse

Profile Sidebar

Collapse
TheReshi
TheReshi
Last Activity: May 22 '14, 08:34 PM
Joined: May 12 '14
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • TheReshi
    replied to String function parameter replacing
    Thank you very much, you helped me out quite well. Now I get it more or less. This is kinda difficult to decode:
    Code:
    patt = re.compile(r'(f\((.[^)]+)\))')
    .

    However, I tried to give it some conditions, like if the left or right part of the f() call contains "+, -, *, /" marks, then replace it with a bracketed one. It only works for the first two call function but it leaves out the third one. I don't know why, I tried to print every...
    See more | Go to post

    Leave a comment:


  • TheReshi
    started a topic String function parameter replacing

    String function parameter replacing

    Hi guys!

    I would like to ask your help. I have started learning python, and there are a task that I can not figure out how to complete. So here it is.

    We have a input.txt file containing the next 4 rows:

    Code:
    f(x, 3*y) * 54 = 64 / (7 * x) + f(2*x, y-6)
    
    x + f(21*y, x - 32/y) + 4 = f(21 ,y)
    
    86 - f(7 + x*10, y+ 232) = f(12*x-4, 2*y-61)*32 + f(2, x)
    
    65 - 3* y = f(2*y/33 , x +
    ...
    See more | Go to post
No activity results to display
Show More
Working...