์ „์ฒด ๊ธ€

Python, C++, Data Science ๊ณต๋ถ€ ๋ธ”๋กœ๊ทธ ์ž…๋‹ˆ๋‹ค.
ยทpython
An iterable is an object, obj, that produces an iterator via the syntax iter(obj).An iterator is an object that manages the iteration of a series of values. If variable it identifies an iterator object, then each call to the built-in function, next(it), produces a subsequent element from the underlying series, with a StopIteration exception raised to indicate that there are no further elements. ..
ยทpython
Python provides various bitwise operators that allow for convenient manipulation of the individual bits of a binary representation of an integer. For example, the integer 23 is represented in binary with rightmost bits 00010111 and the integer 13 is represented in binary with rightmost bits 00001101. The bitwise and operation, 23 & 13, produces integer 5, which has bit 1 in each position for whi..
ยทpython
Files and Exceptions  To access a file, you must first open itOpen a file for reading (“r”) Open a file for writing (“w”)  - If the output file already exists, it is emptied before the new data is written into it. - If the file does not exist, an empty file is created. To write in the file,  - You MUST explicitly write the newline character (\n) to start a new line. - You can also write formatte..
ยทpython
tuple: An immutable sequence similar to a list.triple = (5, 10, 15)triple2 = 5, 10, 15When creating a tuple, you can either use or omit the paranthesis. ์ด ๊ธ€์—์„œ๋Š” ํŠœํ”Œ์ด ํŒŒ์ด์ฌ์—์„œ ์‚ฌ์šฉ๋˜๋Š” ๋ช‡๊ฐ€์ง€ ๊ฐ„๋‹จํ•œ ์˜ˆ๋ฅผ ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.  ํŒŒ์ด์ฌ์—์„œ๋Š” ์—ฌ๋Ÿฌ๊ฐœ์˜ ์ธ์ž๋ฅผ ์ž…๋ ฅ๋ฐ›๋Š” ํ•จ์ˆ˜๋“ค์ด ์กด์žฌํ•ฉ๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค๋ฉด sum ํ•จ์ˆ˜๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. a = sum(1, 3) # Set a = 4b = sum(1, 3, 5, 7) # Set b = 16๋ณด์‹œ๋‹ค์‹œํ”ผ 2๊ฐœ, 4๊ฐœ, ๋˜๋Š” ๊ทธ ์ด์ƒ์˜ ์ธ์ž๋ฅผ ์ž…๋ ฅ ๋ฐ›์Šต๋‹ˆ๋‹ค. ์ด๋Ÿฌํ•œ sum ํ•จ์ˆ˜๋ฅผ ์ง์ ‘ ๊ตฌํ˜„ํ•˜์ž๋ฉด, asterisk (*) ๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.def sum(*val..
Chan Lee
Chan Code & DS ๐Ÿง‘‍๐Ÿ’ป๐Ÿ“Š