Tech Support Guy banner
Status
Not open for further replies.
1 - 2 of 2 Posts

·
Registered
Joined
·
1,240 Posts
Discussion Starter · #1 ·
Alright in a file I have:

media-sound/beep-media-player 124
media-video/mplayer 678
www-client/mozilla-firefox 11278

Which when read creates a list that reads as such

['media-sound/beep-media-player 124\n', 'media-video/mplayer 678\n', 'www-client/mozilla-firefox 11236\n']

I'm wondering how I can match a since entry in the list so that I can replace it.
 

·
Registered
Joined
·
1,240 Posts
Discussion Starter · #2 ·
I think I'l be able to do it with a index search based on a previously known value

something like:
section = clear.index('%s' % (data))

I should then be able to pop that record out and then add it back in at the end.
 
1 - 2 of 2 Posts
Status
Not open for further replies.
Top