Quick actions

cmd+k|ctrl+k

Navigation

Languages

حل تمرین جلسه 7: فانکشن ها

Snippet info

Language

Python

Visibility

public

Author

behzadferiduni

Created

2024-08-02T20:25:27.769432Z

Updated

2024-08-02T20:27:45.147703Z

def only_odd(my_list):
    for e in my_list:
        if e % 2 != 0:
            print(e)

# numbers = [0, 1 ,2 ,3 4, 5, 6, 7, 8, 9]
numbers = list(range(10))
print(numbers)
only_odd(numbers)
INFO