text_plain_output_1.png
import random

import random
list = []
for i in range(5):
    list.append(random.randint(1, 10))
list.sort()

list = []
for i in range(1, 11, 2):
    list.append(i)

buah = ['Anggur', 'Jambu', 'Apel', 'Pisang', 'Semangka']
print('List with Slicing = ', buah[2:5])
print('Panjang List ini =', len(list))