Python - Deleting the first 2 lines of a string

前端 未结 6 1781
渐次进展
渐次进展 2021-02-07 00:39

I\'ve searched many threads here on removing the first two lines of a string but I can\'t seem to get it to work with every solution I\'ve tried.

Here is what my string

6条回答
  •  梦毁少年i
    2021-02-07 01:18

    You could use some rules, like consider those lines only if they start with '[' character lines = [line for line in lines if line.startswith('[')]

提交回复
热议问题