I write this code but I need to use a function in order to get a return instead printing the output :    """A catering company has hired you to help with organizing and preparing customer's orders. You are given a list of each customer's desired items, and must write a program that will count the number of each items needed for the chefs to prepare. The items that a customer can order are: salad, hamburger, and water.

Write a function called item_order that takes as input a string named order. The string contains only words for the items the customer can order separated by one space. The function returns a string that counts the number of each item and consolidates them in the following order: salad:[# salad] hamburger:[# hambruger] water:[# water] 

If an order does not contain an item, then the count for that item is 0. Notice that each item is formatted as [name of the item][a colon symbol][count of the item] and all item groups are separated by a space.

For example:
•If order = "salad water hamburger salad hamburger" then the function returns "salad:2 hamburger:2 water:1"
•If order = "hamburger water hamburger" then the function returns "salad:0 hamburger:2 water:1" """



 s = '"hamburger water hamburger water salad "'
#The value of s will be received by the user only with the options in s
    
    subs = 'salad'
    
    count =0
    flag=True
    start=0
    while flag:
        a = s.find(subs,start)  
                                      
        if a==-1:          
            flag=False
        else:               
            count+=1        
            start=a+1
    if count==0:
        salad="salad:0"
    else:    
            b=str(count)   
            c=subs+':'
            salad=c+b 
            
            
    subs = 'water'
    
    count =0
    flag=True
    start=0
    while flag:
        a = s.find(subs,start)  
                                      
        if a==-1:          
            flag=False
        else:               
            count+=1        
            start=a+1
    if count==0:
        water="water:0"
    else:      
            
            b=str(count)   
            c=subs+':'
            water=c+b 
    
    
    
    subs = 'hamburger'
    
    
    count =0
    flag=True
    start=0
    while flag:
        a = s.find(subs,start)  
                                      
        if a==-1:          
            flag=False
        else:               
            count+=1        
            start=a+1
    if count==0:
        hamburger="hamburger:0"
    else:
            b=str(count)   
            c=subs+':'
            hamburger=c+b 
            
            
    print salad,hamburger,water