DynamicPL/Python
-
Asterisk(*) of PythonDynamicPL/Python 2019. 10. 18. 16:15
1. Overview There are 4 cases for using the asterisk in Python. For multiplication and power operations. For repeatedly extending the list-type containers. For using the variadic arguments. (so-called “packing”) For unpacking the containers. Let’s look at each case. 2. Description 2.1 For multiplication and power operations >>> 2 * 3 6 >>> 2 ** 3 8 >>> 1.414 * 1.414 1.9993959999999997 >>> 1.414 ..
-
Data Structure in PythonDynamicPL/Python 2019. 10. 18. 14:54
1. Overview There are quite a few data structures available. The builtins data structures are lists, tuples, dictionaries, strings, sets, and frozensets. Lists, strings, and tuples are ordered sequences of objects. Unlike strings that contain only characters, list and tuples can contain any type of objects. Lists and tuples are like arrays. Tuples like strings are immutables. Lists are mutables ..