fork download
  1. # your code goes here
  2. s = 'This is a test code [asdf -wer -a2 asdf] (ascd asdfas -were)'
  3. print (s[s.find("["):s.find("]")+1])
  4. print (s[s.find("("):s.find(")")+1])
Success #stdin #stdout 0.02s 9984KB
stdin
Standard input is empty
stdout
[asdf -wer -a2 asdf]
(ascd asdfas -were)