本文介绍了Python-删除字符串的前两行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在这里搜索了很多线程,以删除字符串的前两行,但似乎无法使其与我尝试过的每个解决方案一起使用.
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 looks like:
version 1.00
6992
[-4.32063, -9.1198, -106.59][0.00064, 0.99993, -0.01210][etc...]
我想为我正在使用的脚本删除此Roblox网格文件的前两行.我该怎么办?
I want to remove the first two lines of this Roblox mesh file for a script I am using. How can I do that?
推荐答案
我不知道你的最终角色是什么,但是诸如此类的事情
I don't know what your end character is, but what about something like
postString = inputString.split("\n",2)[2];
结束符可能需要转义,但这就是我的开始.
The end character might need to be escaped, but that is what I would start with.
这篇关于Python-删除字符串的前两行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!