Quick actions

cmd+k|ctrl+k

Navigation

Languages

shuffle

Snippet info

Language

Python

Visibility

public

Author

krishnakanth

Created

2023-08-02T15:30:39.41092Z

Updated

2023-08-02T15:30:39.41092Z

def shuffle(l,k):
    res = []
    ll = len(l)
    kl = len(k)
    
    for i in range(0,min(ll,kl)):
        res.append(l[i])
        res.append(k[i])    
    print(res)
    if len(l) < len(k):
        res += k[len(l):]
    elif len(l) > len(k):
        res += l[len(k):]
        
    return res
    
INFO