Caeser Cipher
Functions with inputs (입력값이 있는 함수)
Argument (인자), Parameters (매개변수)의 차이
Function with inputs
def greet_with_name(something):
print(f"Hello {something}")
print(f"How do you do {something}?")
something = kwon
something → Parameter (매개변수 = 전달되는 데이터의 이름)
kwon → Argument (인자 = 데이터의 실제값)
맥북에서 전체 주석처리 = command + /
Positional Arguments (위치 인자), keyword Arguments (키워드 인자)
def greet_with(name, location):
print(f"Hello {name}")
print(f"what is it like in {location}")
greet_with("kwon", "b's")
def greet_with(name, location):
print(f"Hello {name}")
print(f"what is it like in {location}")
greet_with(a = kwon, b = "b's")
strings를 list로 만들어보자
name = input("what your name?\\n")
name_list = list(name)
print(name_list)
>>>
what your name?
kwon
['k', 'w', 'o', 'n']