목록Python/Python Basics (3)
NeatCoder's Lab
파이썬에서는 str 타입을 사용하여 문자(String)열을 표현한다. 문자열이란 곧 일련의 문자다. String method join() String_A.join(String_B)는 리스트 String_B에 있는 모든 문자열을 하나의 단일 문자열 String_A로 결합한다. 문자열을 연결하는 데에는 +기호를 사용할 수도 있지만, 리스트에 많은 양의 문자열이 있으면 비효율적이다. lst = ["Buffer", "and", "Austin"] print(" ".join(lst)) # 'Buffer and Austin' print("+".join(lst)) # 'Buffer+and+Austin' ljust(), rjust() stringA.ljust(width, fillchar)는 문자열 stringA '맨 처..

Today we will try to learn about the data types of python. Text type : str Numeric type : int, float, complex Sequence type : list, tuple, range Mapping type : dict Boolean type : set, frozenset Binary type : bool Set type : bytes, bytearray, memoryview Variables can store data of different types, and different types are for diferent purposes. Here are some examples below x = "Hello World"#str x..