Simple solution in python3 by me


#1
def wave(self, A):
    A=list(A)
    a=sorted(A)
    #if len(a)>0:
    
    temp1=[]
    while (len(a)>0):
        if len(a)==1:
            poped=a.pop(0)
            temp1.append(poped)
            break
            
            
      
      
   
        ape1=a.pop(1)
       
        ape2=a.pop(0)
        temp1.append(ape1)
        
        temp1.append(ape2)
        #print("a",a)
        #print('temp1',temp1)
    return temp1