Iterate the given list of numbers and print only those numbers which are divisible by 5

Expected Output:

Given list is [10, 20, 33, 46, 55] Divisible by 5 10 20 55

Solution:

num_list = [10, 20, 33, 46, 55] print("Given list:", num_list) print('Divisible by 5:') for num in num_list: if num % 5 == 0: print(num)

total answers (1)

start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.

need an explanation for this answer? contact us directly to get an explanation for this answerSolution: