Skip to content

Instantly share code, notes, and snippets.

View MacTechIN's full-sized avatar
🎯
Focusing

LEE SANG JIN MacTechIN

🎯
Focusing
View GitHub Profile
@MacTechIN
MacTechIN / gist:61f8570a4152778a875f6a062531b866
Created September 20, 2023 16:59
Python list conprehension examples
#
# a = []
# for i in range(1, 10+1):
# if i % 2 == 1:
# a.append(i*2)
#
# print (a)
# List comprehension type by python
import sys
def get_natural_number():
n = 0
while True:
n += 1
yield n