Advertisement
GabrielePozzoli

reverse_count

Nov 22nd, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. def reverse(list):
  2. #@param list: List
  3. #@return none
  4.   newList=[]
  5.   for i in range(len(list)-1,-1,-1):  
  6.     newList.append(list[i])
  7.   return newList
  8.  
  9.  
  10. def count(list,som):
  11. #@param list: List
  12. #@param som: All type of data
  13. #@return Int
  14.   count=0
  15.   for i in range(0,len(list)):
  16.     if list[i]==som:
  17.       count=count+1
  18.   return count
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement