get nth line of string in python

后端 未结 9 1808
萌比男神i
萌比男神i 2021-01-02 08:50

How can you get the nth line of a string in Python 3? For example

getline(\"line1\\nline2\\nline3\",3)

Is there any way to do this

9条回答
提交回复
热议问题