How do I use 'remove' function, 'count' function and 'reverse' fuction in python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How do I use 'remove' function, 'count' function and 'reverse' fuction in python

26th Sep 2021, 6:46 PM
bernard
bernard - avatar
2 Answers
+ 10
bernard , I wonder why you don't google. you can find tons of good examples. here are examples from me: all_nums = [0, 113, 1, 8 ,0, 34] print(all_nums) all_nums.remove(113) print(all_nums) all_nums = [0, 113, 1, 8 ,0, 34] print(all_nums.count(0)) all_nums = [0, 113, 1, 8 ,0, 34] all_nums.reverse() print(all_nums)
26th Sep 2021, 7:32 PM
Lothar
Lothar - avatar
0
Thanks
26th Sep 2021, 11:17 PM
bernard
bernard - avatar