Python Variables and Memory ManagementVariable Variable is a way to refer to memory locations being accessed by a computer program. In languages like C, C++, Java, a variable is a name given to a memory location. So when we say: int x; float y; It asks the compiler to create memory space...1SMay 6, 2021 ยท 5 min readswetashaw.hashnode.dev
Formatted String Literals in PythonOld-school way of formatting strings str.format() The Python string .format() method was introduced in version 2.6. Following is an example that uses .format() method of formatting strings. #Example 1 (simple) name = "Sweta Shaw" print("My name is {...1DApr 29, 2021 ยท 3 min readswetashaw.hashnode.dev