How to remove the first occurrence of a value from a list in Python

1 Answer

0 votes
programming = ['Python', 'Java', 'C#', 'C', 'PHP', "C++", "C#"]

print(programming)

programming.remove("C#")

print(programming)

'''
run:

['Python', 'Java', 'C#', 'C', 'PHP', 'C++', 'C#']
['Python', 'Java', 'C', 'PHP', 'C++', 'C#']

'''

 



answered Sep 22, 2017 by avibootz
...