User Profile

Collapse

Profile Sidebar

Collapse
sudeepto
sudeepto
Last Activity: Jun 23 '15, 04:22 PM
Joined: Jun 16 '15
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Thank you bvdet. But I have a question.

    Can you please explain me what is happening in the code ?? I have never used eval function in Python.

    Also I have read that using eval is not recommended in Python. Can you tell me why is that ??

    EDIT: I used your approach of substituting the
    Code:
    ) (
    part with
    Code:
    ), (
    so that I get the string

    Code:
    (1, 2), (3, 4)
    Then after that, I searched on StackOverflow...
    See more | Go to post

    Leave a comment:


  • Extract tuples from space separated string of tuples.

    I have string in the following form:

    Code:
     my_string = '(1, 2) (3, 4)'
    As you can see, the tuples inside the string are space separated. I want to know how can I extract those tuples into separate variables.
    See more | Go to post
No activity results to display
Show More
Working...