fork(1) download
  1. import re, ast
  2. line = "assert Solution().oddEvenList(genNode([2,1,3,5,6,4,7])) == genNode([2,3,6,7,1,5,4]), 'Example 2'"
  3. for m in re.finditer(r'genNode\((\[[0-9,]+])\)', line):
  4. nums = ast.literal_eval(m.group(1))
  5. print(nums)
Success #stdin #stdout 0.02s 28232KB
stdin
Standard input is empty
stdout
[2, 1, 3, 5, 6, 4, 7]
[2, 3, 6, 7, 1, 5, 4]