By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,529 Members | 824 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,529 IT Pros & Developers. It's quick & easy.

remove particular word from a string which is inside a list

P: 1
list = ['Name: 0/RP0 Descr: Network Convergence System 1000 Controller', 'Name: 0/FT0 Descr: Network Convergence System 1004 Fan', 'Name: 0/FT1 Descr: Network Convergence System 1004 Fan', 'Name: 0/FT2 Descr: Network Convergence System 1004 Fan', 'Name: 0/PM0 Descr: Network Convergence System 4000 2KW AC PSU 2', 'Name: 0/PM1 Descr: Network Convergence System 4000 2KW AC PSU 2', 'Name: 0/SC0 Descr: Network Convergence System 1000 Controller']

i want to remove "name:" and "descr:" from the above list

result should be :
['0/RP0 Network Convergence System 1000 Controller', '0/FT0 Network Convergence System 1004 Fan', '0/FT1 Network Convergence System 1004 Fan', '0/FT2 Network Convergence System 1004 Fan', '0/PM0 Network Convergence System 4000 2KW AC PSU 2', '0/PM1 Network Convergence System 4000 2KW AC PSU 2', '0/SC0 Network Convergence System 1000 Controller']
Jan 29 '18 #1
Share this Question
Share on Google+
1 Reply


abeLuna
P: 13
What programming language do you want to write this in?
Apr 5 '18 #2

Post your reply

Sign in to post your reply or Sign up for a free account.