Skip to content

Lab 03, task 7 #1

@sevinjyolchuyeva

Description

@sevinjyolchuyeva

I wrote this task as below:
s='hey (come) go'
re.sub('[(].*?[)]', '', s)

The output is: 'hey go'

But if s='hey (come) go (flat)' then the 'go' is deleted too.
How can I write code that output should be 'hey go'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions