<< < 1 2 3 4 5 6 >   Sort: Date

What Is Module
What Is Module in Python? A module in Python is a collection of Python code saved in a separate file. A module can have the following elements: Module name - A symbolic name that uniquely identifies this module within the context. By default, the module name is the file name (without the file extens...
2022-09-24, 1243🔥, 0💬

'sys' Module - System Parameters and Functions
Where to find tutorials on Python "sys" Module? Here is a list of tutorials to answer many frequently asked questions compiled by FYIcenter.com team on Python "sys" Module. What Is Python Module 'sys' Printing Python Engine Information sys.argv - Command Line Argument List   ⇒ What Is Python Module ...
2018-11-11, 1240🔥, 0💬

'float' Values are Objects
Are "float" values objects in Python? Yes, "float" values are objects in Python. In fact, all data values in Python are objects. In Python, "float" is defined as an object class with the following interesting properties, constructors, and methods: float.__doc__ - Property holding a short description...
2022-12-03, 1239🔥, 0💬

Variable Scope in Function Definition Statements
What is the scope of a variable introduced in a function definition "def" statement block in Python? Any new variables introduced in a function statement block is valid only in that statement block. In other words, the scope of a local variable in a function is limited to the function only. Also not...
2022-10-26, 1234🔥, 0💬

Manage and Use Instance Properties
How to manage and use instance properties? Instance properties, also called instance attributes, are name value pairs associated with class instance object, and not shared with other instances created from this class. You can manage and use instance properties in various places: 1. In the class "__i...
2022-09-24, 1234🔥, 0💬

'bytes' Literals and Conversions
How to specify "bytes" values in Python code? "bytes" values can be specified using "bytes" literals or the bytes() conversion function as shown in this tutorial: 1. "bytes" literals in b'...' or b"..." format as shown below: &gt;&gt;&gt; b'FYIcenter.com' b'FYIcenter.com' &gt;&gt...
2018-04-07, 1233🔥, 0💬

What Is Module Package
What Is Module Package in Python? A module package in Python is a collection of Python module files saved in a file directory with a special file called __init__.py. A module package can have the following elements: Package name - A symbolic name that uniquely identifies this module package within t...
2022-08-26, 1222🔥, 0💬

'for ... in ... else' Repeating Statement Blocks
How to enter "for ... in ... else" statements block in Python code? "for ... in ... else" statement blocks allow you to execute the main statement block repeatedly. When "for ... in ... else" statement blocks are interpreted, the "for" statement block will be executed repeatedly for each item in the...
2023-05-09, 1217🔥, 0💬

'bool' Values are Objects
Are "bool" values objects in Python? Yes, "bool" values are objects in Python. In fact, all data values in Python are objects. In Python, "bool" is defined as a sub class of the "int" object class with the following interesting properties, constructors, and methods: bool.__doc__ - Property holding a...
2023-07-01, 1213🔥, 0💬

Parameter List in Function Definition Statements
How to specify parameters in the "def" statement to define a new function in Python? When defining a function, you can specify the parameter list as a comma separated list of variables with or without default values in the following syntax: def function_name(variable,variabl e,...,variable=default_va...
2022-10-26, 1212🔥, 0💬

'int' Values are Objects
Are "int" values objects in Python? Yes, "int" values are objects in Python. In fact, all data values in Python are objects. In Python, "int" is defined as an object class with the following interesting properties, constructors, and methods: int.__doc__ - Property holding a short description of "int...
2023-07-01, 1209🔥, 0💬

'str' Values are Objects
Are "str" values objects in Python? Yes, "str" values are objects in Python. In fact, all data values in Python are objects. In Python, "str" is defined as an object class with the following interesting properties, constructors, and methods: str.__doc__ - Property holding a short description of "str...
2022-12-03, 1209🔥, 0💬

'import' Module Package Loading Statement
How to use "import" statement to load Python module packages? If you created a Python module package directory called "firstPackage" as described in the previous tutorial, you can load it into your Python execution session using the "import" statement: 1. Make sure the module package directory is a ...
2022-08-26, 1208🔥, 0💬

Classes Are Objects Too
Are classes objects in Python? Yes, all classes are objects of "type" type in Python? You can verify this with the following Python code: &gt;&gt;&gt; class x: ... pass ... &gt;&gt;&gt; type(x) &lt;class 'type'&gt; In other words, the "class x" statement block perform...
2018-05-08, 1207🔥, 0💬

What Is Python Module 'json'
What Is Python module "json"? "json" is a Python internal module that allows to encode and code JSON strings. Here are some important properties and functions provided by the "json" module: &gt;&gt;&gt; import json &gt;&gt;&gt; json.dumps() # serializes a given object into a ...
2018-10-13, 1189🔥, 0💬

'break' Statement in Repeating Statement Blocks
How to use the "break" statement in a repeating statement block in Python code? The "break" statement can be used in a repeating statement block like "for" and "while" loops to terminate the loop immediately. When a "break" statement is interpreted, Python will terminate execution of the nearest "fo...
2018-02-28, 1181🔥, 0💬

'break' Statement in Repeating Statement Blocks
How to use the "break" statement in a repeating statement block in Python code? The "break" statement can be used in a repeating statement block like "for" and "while" loops to terminate the loop immediately. When a "break" statement is interpreted, Python will terminate execution of the nearest "fo...
2018-02-28, 1181🔥, 0💬

Defining and Using Python Code Modules
Where to find tutorials on Defining and Using Python Code Modules? Here is a list of tutorials to answer many frequently asked questions compiled by FYIcenter.com team on Defining and Using Python Code Modules: What Is Module 'import' Module Loading Statement Modules Are Objects Too What Is Module P...
2022-09-24, 1176🔥, 0💬

Modules Are Objects Too
Are modules objects in Python? Yes, all modules are objects of "module" type in Python? You can verify this with the following Python code: &gt;&gt;&gt; import firstModule &gt;&gt;&gt; type(firstModule) &lt;class 'module'&gt; In other words, the "import firstModule" s...
2022-08-26, 1164🔥, 0💬

Basic Structure of Python Code
What is Basic Structure of Python Code? The basic structure of Python code can be described below: A Python code is a sequence of statements and statement blocks. Each statement or statement block in a Python code is executed sequentially one by one. For example, look at the following Python code wi...
2023-06-12, 1161🔥, 0💬

Understanding Data Values as Objects
Where to find tutorials on Understanding Data Values as Objects? Here is a list of tutorials to answer many frequently asked questions compiled by FYIcenter.com team on Understanding Data Values as Objects: 'int' Values are Objects 'bool' Values are Objects 'float' Values are Objects 'str' Values ar...
2023-07-01, 1155🔥, 0💬

'import' Module Loading Statement
How to use "import" statement to load Python modules? If you created a Python module file called "firstModule.py" as described in the previous tutorial, you can load it into your Python execution session using the "import" statement: 1. Make sure the module file is in the current directory: \fyicent...
2022-08-26, 1149🔥, 0💬

'dict' Literals and Conversions
How to specify "dict" values in Python code? "dict" values can be specified using "dict" literals or the dict() conversion function as shown in this tutorial: 1. "dict" literals in {n1:v1, n2:v2, ...} format as shown below: &gt;&gt;&gt; {"Age":25, "Name":"Joe"} {'Age': 25, 'Name': 'Joe'}...
2023-07-01, 1136🔥, 0💬

Where Are Instance Properties Stored
Where Are Instance Properties Stored? Instance properties are stored in a built-in property called "__dict__" in each instance object. The "__dict__" property is inherited from the base class "object" and managed by the Python engine. If you ever forget what instance properties are associated with a...
2022-09-24, 1133🔥, 0💬

<< < 1 2 3 4 5 6 >   Sort: Date