[Solved] How to print specific strings in python? [closed]


You could use a regular expression:

import re

string = """736.199070736:  LOG_MOD_L0_RECEIVE_TXBRP_CONTROL(0, 
 0x0075007f, 
 0x005500dd,  
 0x000a00f5)"""

result = re.search(r'\(.*\)', string) # matches anything between parenthesis

result.group()

'(0, 0x0075007f, 0x005500dd,  0x000a00f5)'

That gives you the data as a string.

2

solved How to print specific strings in python? [closed]