Zack

Money and Business

Python, complex types to work with complex numbers (absolute values, declination, polar transformations, etc.)

Python has a standard type for handling complex numbers, the COMPLEX type. If you just want to do simple calculations, y...
Money and Business

Assigning multiple or the same value to multiple variables in Python

In Python, the = operator is used to assign values to variables.a = 100 b = 200 print(a) # 100 print(b) # 200 As in th...
Money and Business

Unpack (expand and assign to multiple variables) tuples and lists in Python

In Python, elements of a tuple or list can be expanded and assigned to multiple variables. This is called sequence unpac...
Money and Business

Tuples with a single element in Python require a trailing comma

Tuples, which are immutable (unchangeable) sequence objects in Python.Care must be taken when generating tuples with a s...
Money and Business

Python determines and checks whether a string is numeric or alphabetic

Python provides several string methods to determine and check whether a string type is numeric or alphabetic.String Meth...
Money and Business

Determining if a number is an integer or a decimal in Python

Determine if a number is an integer or a decimal in Python.The following cases are explained with sample codes.Determine...
Money and Business

Get integer and decimal parts of a number at the same time with math.modf in Python

The modf() function of math, the standard module for mathematical functions in Python, can be used to obtain the integer...
Money and Business

Convert number string str to number int, float in Python

If you want to convert a string of numbers to numeric values in Python, use int() to convert to integers and float() to ...
Money and Business

Converting lists of strings (arrays) and lists of numbers to each other in Python

The following contents, along with sample code, explain how to convert lists (arrays) of strings (str) and lists of numb...
Money and Business

Extract, replace, and transform specific elements of Python lists (arrays)

To generate a new list in Python by extracting or deleting only those elements of an existing list (array) that satisfy ...
Copied title and URL