sort (half)
Python
a = [2,3,8,-1,7,1]
b = [-4, 6, 9, -1, 3]
c = []
d = []
a.sort()
b.sort()
x = len(a) // 2
y = len(b) // 2
for i in range(x):
if a[i] <= x:
c.append(a[i])
if b[i] <= y:
c.append(b[i])
print(c)
Output
Embed on website
To embed this program on your website, copy the following code and paste it into your website's HTML:
Comments
This comment belongs to a banned user and is only visible to admins.
This comment belongs to a deleted user and is only visible to admins.